Hi,
what is the best way to delete ALL records in a recordset?
I would like to know it in ADO and how i can use for it a SQL-command.
Franky
Printable View
Hi,
what is the best way to delete ALL records in a recordset?
I would like to know it in ADO and how i can use for it a SQL-command.
Franky
For Access:
DELETE FROM TableName [WHERE (Condition)]
For SQL Server:
TRUNCATE TABLE TableName
Thanks for the fast reply
This I knew already, hehe .......
But I want to make it in an ADO way.
Franky
you can use axion_sa way, using ADO... or am I missing something here ? (would not be the first time :) )
VB Code:
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb" cnn.Open sConnString cnn.Execute "DELETE FROM TableName [WHERE (Condition)] "
How you get that work with Access, i cant ?
(It works great with SQL Server but Access)
VB Code:
db.execute "delete from table..... I need to use dbexecute " delete * from table.....
you are abs. right oh1mie. :)Quote:
Originally posted by oh1mie
How you get that work with Access, I cant ?
(It works great wit SQL Server but Access)
VB Code:
db.execute "delete from table..... I need to use dbexecute " delete * from table.....
whoops :o my bad :p