View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default Excel to Access - ADO?

"Donnie Stone" wrote in message
...
I'm using ADO to export data from Excel to Access and it's working fine.

I
need to know how to automatically delete all records in the Access

database
prior to running my macro?


Hi Donnie,

There isn't any simple way to delete the entire contents of a database
all at once that I know of. You have to do it one table at a time, by
executing individual SQL statements like the following:

DELETE FROM MyTable1;
DELETE FROM MyTable2;
...etc...

until you've cleared all the tables in your database. Note that if you have
any declarative referential integrity set up among your tables, you have to
clear the tables in such an order that it doesn't violate any of those
constraints.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *