Compacting backend

gaidheal

Registered User.
Local time
Today, 01:05
Joined
Oct 7, 2008
Messages
18
I have created an archiving process that removes specific records from a database and puts them into a new database. All is working nicely, but the source backend needs to be compacted at the end of the process. I know I can do it easily manually, but I wanted to make it as automatic as possible.

I have seen this code:

dbengine.CompactDatabase(sourcename,destname)

and I am a bit confused. If I do a compact and repair manually, I don't get prompted for a destination. Why would it be required doing it this way? I really don't want to create a new database for the process, it kinda defeats the purpose.

Help?
 
Hi

Take a look at the VBA help file from which I have take the following quote:
The newdb duplicate database doesn't have to be on the same disk as olddb. After successfully compacting a database, you can delete the olddb file and rename the compacted newdb file to the original file name.
 

Users who are viewing this thread

Back
Top Bottom