Programmatically Compact and Repair Access Example
string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0 ; Data Source=" + mainPath + @"; Jet OLEDB:Engine Type=5; Jet OLEDB:Database Password=XXX;" ; string compactedNewFilePathAndName = mainPath.Replace( ".accdb" , "_TEMP.accdb" ); CompactAndRepair .CompactAccessDB(connectionString, compactedNewFilePathAndName, mainPath); -------------------- -------------------- class CompactAndRepair { /// <summary> /// MBD compact method (c) 2004 Alexander Y...