Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using adodb control.....

Status
Not open for further replies.

Jetttt

MIS
Nov 3, 2003
32
MX
How i can use the adodb control to delete all the records of one table????

or maybe what is the best way to do it???

I am using a mdb File like database, conected to visualbasic using a odbc connection.

I tryied using the adodb control of this way :

adbControl.RecordSource = "Delete * from Table"
adbControl.Refresh

But i have a error

Any ideas.

Thanks.

Jetttt
 
ADODB is not a *control*, it is the way you can connect to your database.

Go to Project - References....
and add a reference to Microsoft ActiveX Data Objects X.X Library

After that you can use ADODB in your code: establish ADODB connection and run SQLs, like the one you want, ie Delete * from Table

HTH

--- Andy
 
If the op is refering to the ADO Data Control (ADODC), they could look at thread222-592785 for a way to run action queries using that control. Else Andy offers a method (that I would personally use) that allows you to perform the same functions of the ADODC without having to include the extra control in your project.

Hope this helps

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top