|
-
Oct 7th, 1999, 02:04 PM
#1
Thread Starter
Member
Hi guys is there a way to delete multiple table in a single command or any other sugestion?? THKS.
The code for delete one table is as follow:
Dim db As Database
Dim sql As String
Set db = OpenDatabase("c:\p1\data.mdb")
sql = "delete from ACC"
db.Execute sql
Is there another way whereby i could add in a single command line into to above to delete
another table??
e.g:
Dim db As Database
Dim sql As String
Set db = OpenDatabase("c:\p1\data.mdb")
sql = "delete from ACC"
sql = "delete from eACC"
db.Execute sql
-
Oct 7th, 1999, 03:14 PM
#2
New Member
Action Query:
Dim db As Database
Set db = Workspaces(0).OpenDatabase("c:\Wherever\Wherever\Database.mdb")
db.Execute "DELETE * FROM Table1"
db.Execute "DELETE * FROM Table2"
db.Close
Set db = Nothing
Hope this helps...........
--Steph
------------------
Email: [email protected]
"Face Down In The Warm Cabo Sand"
[This message has been edited by Off2Cabo (edited 10-08-1999).]
-
Oct 8th, 1999, 12:08 AM
#3
Member
If you've set relationships with cascading deletes and the second table's records match the relationship properties then the seond tables's realted records could "automatically" be deleted.
If not each table gets it's own DELETE query.
------------------
http://www.smithvoice.com/vbfun.htm
-
Oct 8th, 1999, 08:22 AM
#4
Thread Starter
Member
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
|