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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delet all records ADODC

Status
Not open for further replies.

ngabordh

Programmer
Jun 15, 2003
4
HU
Hi

What is the most effective way to delet all records from a table with the ADO Data Control?
How can i execute SQL statements with ADODC?
Thanks.
 
Try this:

Dim cmdDelete As New ADODB.Command
cmdDelete.CommandText = "delete from TableName" cmdDelete.ActiveConnection = YouConnectionString
cmdDelete.Execute
 
The most effective/easiest way to:

"...delet all records from a table with the ADO Data Control"

Adodc1.Recordset.ActiveConnection.Execute "DELETE * FROM SomeTable",,adExecuteNoRecords
 
Thank you guys for the excellent answers!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top