HOW TO: Compact a Microsoft Access Database by Using Visual Basic .NETms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/enu_kbvbnetkb/en-us/vbnetkb/Q306287.htm Neither ActiveX Data Objects (ADO) nor ADO .NET provide the means to compact or repair Microsoft Access databases. However, you can accomplish this task by using the Microsoft Jet OLE DB Provider and Replication Objects (JRO) that was introduced with Microsoft Data Access Components (MDAC) version 2.1. ADO .NET allows the use of COM-based object libraries through the Interop layer.
engine.CompactDatabase("SourceConnection", "DestConnection");
Neither ActiveX Data Objects (ADO) nor ADO .NET provide the means to compact or repair Microsoft Access databases. However, you can accomplish this task by using the Microsoft Jet OLE DB Provider and Replication Objects (JRO) that was introduced with Microsoft Data Access Components (MDAC) version 2.1. ADO .NET allows the use of COM-based object libraries through the Interop layer.