Can someone help me with a way for a user of my app to Compact and Repair a Access2000 db. I would like to provide a command button that will do this. My experience level is limited so don't assume I may know obvious things.
One approach would be to use the JRO Objects - add to the project the Jet and Replication Objects library. Then in the click event of the button, something like the following:
Set JRObj = New JRO.JetEngine
JRObj.CompactDatabase "Data Source=c:\olddb.mdb;", "Data Source="c:\newdb.mdb;"
Set JRObj = Nothing
then delete the old db and rename the new one back to the original name Good Luck
-------------- As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.