是否可以以编程方式检测损坏的Access 2007数据库表? [英] Is it possible to programmatically detect corrupt Access 2007 database tables?

查看:49
本文介绍了是否可以以编程方式检测损坏的Access 2007数据库表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过代码以编程方式(例如从.NET通过SQL查询)询问Access数据库是否已损坏或其中的表具有损坏的行?

Is it possible via code to programmatically (from .NET for example via SQL query) to ask an Access database if it is corrupt or have tables with corrupt rows in it?

//安迪

推荐答案

没有一个应用程序/数据库级别的对象具有"isCorrupted"属性.

None of the application/database level objects have such an "isCorrupted" property.

此外,损坏的数据库没有标准的行为.根据情况,数据库可能根本无法打开(该文件未被识别为有效的mdb文件).如果打开,则可能立即发生错误,或者在使用/打开特定对象(表,表单或VBA代码)时发生错误.

Furthermore, corrupted databases do not have a standard behaviour. Depending on the situation, database might not open at all (file is not recognized as a valid mdb file). If it opens, error might occur immediately or when using/opening a specific object (table, form, or VBA code).

在这种情况下,我认为您的问题没有肯定的答案.

In these conditions, I do not think there is a positive answer to your question.

注意:除了Access的标准压缩/修复选项之外,将对象导出到其他数据库(或从损坏的数据库导入对象)以及未记录的.saveAsText命令也可以提供很大的帮助.

Note: In addition to the standard compact/repair option of Access, exporting object to other databases (or importing them from the corrupted database) as well as the non-documented .saveAsText command can be of great help.

这篇关于是否可以以编程方式检测损坏的Access 2007数据库表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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