Compact ACCDB

  • Thread starter Thread starter John L.
  • Start date Start date
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.
 
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.
 
Back
Top