Comapct & repair

martinainscough

Registered User.
Local time
Today, 10:41
Joined
Apr 8, 2004
Messages
18
At the current time I am producing a program that uses ODBC to update tables overnight from our main database software. One of the tables is about 800MB and needs to be updated once a month.

I created some code to carry this function out along with some others at the click of a button. (like a month end procedure). However I am having some problems with this table. If I don't compact the database before I import the table from ODBC I get an invalid argument error message.

Is there any way I can compact the database using some VB code.

Any help will be greatly apprecited!

Martin
 
You have to run VBA code from another database like:

DBEngine.CompactDatabase DBName, NewDBName
 

Users who are viewing this thread

Back
Top Bottom