I have received a corrupted Access 97 (Jet 3.51) database from one of our clients and I am trying to write a small application in VB
that the user can run to repair it.
I am calling DBEngine.RepairDatabase followed by DBEngine.CompactDatabase (with a few clean-up and GUI lines as well), however the program crashes half way through the CompactDatase call (the original database is about 140Mb and the call fails when it has compacted between 30 and 40Mb).
When I try to do this in Access 2002 through Tools > Database Utilities > Compact and Repair Database... it succeeds, the database is reduced to about 137Mb and it is no longer corrupted.
What is Access doing differently from what I am doing in code? Is there a way to do what access does in my code without having to provide a third party database repair tool for the customer?