如何以编程方式修复(而不仅仅是压缩)Access .mdb文件? [英] How can I programmatically repair (not merely compact) an Access .mdb file?

查看:52
本文介绍了如何以编程方式修复(而不仅仅是压缩)Access .mdb文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据库损坏.如果我在MS Access中打开它,则MS Access会提供修复服务,并且成功.

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

我该如何使用代码?在未安装MS Access的计算机上.

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

通过尝试,我知道JRO.JetEngine.CompactDatabase无法正常工作.

I know from trying it that JRO.JetEngine.CompactDatabase does NOT work.

换句话说,我想做Access或JETCOMP.exe正在做的事情,而不是JRO.JetEngine.CompactDatabase正在做的事情.

In other words, I want to do what Access or JETCOMP.exe is doing, not what JRO.JetEngine.CompactDatabase is doing.

推荐答案

您需要转到 http://support. microsoft.com ,然后搜索JetComp.exe实用程序,该实用程序将尝试在不打开文件的情况下修复并压缩MDB.上面的建议均无用的原因是因为它们必须打开MDB才能进行工作,而JetComp不会打开文件,而是对其进行结构化操作.

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.

如果它无法恢复文件(确实发生了),那么您将不得不使用数据恢复服务.我推荐PKSolutions.com的Peter Miller.

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.

这篇关于如何以编程方式修复(而不仅仅是压缩)Access .mdb文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆