Search code examples
c#vb.netms-access

How can we compact a access database in VB.NET or C#.NET without using DAO and JRO


I am using Access database. Now i compact the database by using DAO and sometimes using JRO. But to this both, we have add the COM reference.

I don't want to add the COM reference for compacting.

Is there any other way to compact an access database without using the COM reference(for DAO and JRO).

Kind help needed. Thanks.

Sivakumar.P


Solution

  • You could also try the Jet Compact utility: http://support.microsoft.com/kb/295334

    This utility has a UI, but can also be called with command line switches:

    jetcomp.exe -src:"C:\input.mdb" -dest:"output.mdb"
    

    To get a full list of available switches:

    jetcomp.exe -?