From: John L. on
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.

From: Tim Roberts on
John L. <JohnL(a)discussions.microsoft.com> wrote:
>
>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.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.