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

后端 未结 4 1266
渐次进展
渐次进展 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:21

    Command-line switch for opening a .mdb file:

    /compact
    

    It repairs and compacts the database file.

    If you leave out a target file name following the /compact switch, the file is compacted to the original name and folder. To compact to a different name, specify a target file.

提交回复
热议问题