How can I programmatically repair (not merely compact) an Access .mdb file?

后端 未结 4 1237
渐次进展
渐次进展 2021-01-15 13:48

I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds.

How can I do that with code? On a machine where MS Access is

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 14:23

    You need to go to http://support.microsoft.com and search for the JetComp.exe utility, which will attempt to repair and compact your MDB without opening the file. The reason none of the suggestions above work is because they have to open the MDB to do their work, whereas JetComp doesn't open the file, but operates on it structurally.

    If it can't recover your file (which does happen), then you'll have to go to a data recovery service. I recommend Peter Miller of PKSolutions.com.

提交回复
热议问题