Compact ACCDB

J

John L.

What is the best method for performing a compact/repair on an ACCDB file from
a C# console EXE application (without calling and using MSACCESS.EXE)? We'd
like to use Jet (or ACE preferably) to accomplish this task and we would like
this compiled EXE to run on a 64-bit Windows machine. Having to install the
Access 2010 64-bit runtime (if required) is ok.

Thanks for the help.
 
T

Tim Roberts

John L. said:
What is the best method for performing a compact/repair on an ACCDB file from
a C# console EXE application (without calling and using MSACCESS.EXE)? We'd
like to use Jet (or ACE preferably) to accomplish this task and we would like
this compiled EXE to run on a 64-bit Windows machine. Having to install the
Access 2010 64-bit runtime (if required) is ok.

You can do this through COM. In the Microsoft Jet & Replication Object
library, create an object of type JetEngine. That contains a
CompactDatabase method. You will need the runtime.

Work carefully -- make lots of copies while you are testing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top