OK, the ADO code I've seen to compact a database is:

objJRO.CompactDatabase strSource, strDestination

My question:

Is there a way to compact the current database rather than creating a new one? What I want to do is to compact the DB when the program loads; however with the above code you have to create a new DB with a new name. Which means, I guess, I have to reset the ConnectionString to the new DB--but if I run the program again, it won't work, because the new DB name will already exist!

What is the professional way to handle this? Do I have to do something like delete the old DB and then rename the new DB back to the old name? Or use a different syntax with the .CompactDatabase method? Any assistance would be appreciated.