|
-
Jul 2nd, 2002, 01:00 AM
#1
Thread Starter
Fanatic Member
ADO: Delete All records at once
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
-
Jul 2nd, 2002, 01:26 AM
#2
For Access:
DELETE FROM TableName [WHERE (Condition)]
For SQL Server:
TRUNCATE TABLE TableName
-
Jul 2nd, 2002, 01:50 AM
#3
Thread Starter
Fanatic Member
Hi Axion
Thanks for the fast reply
This I knew already, hehe .......
But I want to make it in an ADO way.
Franky
-
Jul 2nd, 2002, 02:19 AM
#4
-= B u g S l a y e r =-
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)] "
-
Jul 2nd, 2002, 02:31 AM
#5
Frenzied Member
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.....
Last edited by oh1mie; Jul 2nd, 2002 at 02:56 AM.
oh1mie/Vic

-
Jul 2nd, 2002, 02:48 AM
#6
-= B u g S l a y e r =-
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.....
you are abs. right oh1mie.
-
Jul 2nd, 2002, 03:48 AM
#7
whoops my bad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|