OleDbException 未处理:显示数据库信息时出错
我是新使用 Visual Studio 2010 和 Microsoft Access 2007 创建应用程序。我已经创建了表单,它运行顺利,没有出现任何错误。但是,其中一种表单在显示我想要显示的信息时遇到问题。所有创建的形式都具有相同的功能,但是这一种形式却不能很好地发挥作用。
这是不起作用的表单的屏幕截图:
错误消息的屏幕截图:
请帮忙。谢谢。
I'm new creating applications using Visual Studio 2010 and Microsoft Access 2007. I already created forms and it runs smoothly without getting any errors. However, one of the forms is having trouble in displaying the information I want to display. All of the created forms have the same functions but then this one form is not functioning well.
This is the screenshot of the form that is not functioning:
Screenshot of the error message:
Please help. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于 Access 数据库,该特定错误(IErrorInfo.GetDescription 失败,E_FAIL 0x80004005)通常意味着您正在尝试访问不存在或为关键字的字段或表。
我怀疑错误可能是位置字段。如果用方括号将所有字段名称括起来,如果是关键字冲突,错误就会消失:
For an Access database, that particular error (IErrorInfo.GetDescription failed with E_FAIL 0x80004005) generally means that you are trying to access a field or table that doesn't exist or is a keyword.
I suspect that the error may be the position field. If you surround all of your field names with brackets, the error will go away if it was a keyword conflict:
如果您将列/表名称放在大括号内,应该可以解决您的问题。 (位置是 SQL 保留字。)
If you put your column/table names inside braces that should fix your problem. (Position is a SQL reserved word.)
首先,您必须验证字段和表的名称。它们可能包含不受支持的文本或字符。如果这些字段和表名中添加了空格,则用
[]
括起这些标识符。First of all you have to verify the name of fields and table. May be they contain unsupported text or characters. If spaces are added with these fields and table name then enclosed these identifiers with
[]
.