如何获取 Access (Jet) 数据库中的表列表?
我需要查看我的 c# 程序使用的 Access 数据库中是否存在表。我们知道其他数据库的 SQL 命令将返回表列表。 Access/Jet 数据库有这样的命令吗?
I need to see if a table exists in an Access database used by my c# program. Is know there are SQL commands for other databases that will return a list of tables. Is there such a command for Access/Jet databases?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试 GetSchema()
Try the GetSchema()
完整代码: 获取 Access 数据库中的表列表 - ADO.NET教程
这里是你的答案:http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/d2eaf851-fc06-49a1-b7bd-bca76669783e
Full code : Get List of Tables in an Access Database - ADO.NET Tutorials
here is answer for you : http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/d2eaf851-fc06-49a1-b7bd-bca76669783e
像这样的事情应该可以解决问题。子句
Type = 1
指定表。请注意,这还将包括结果集中的系统表(它们以前缀“MSys”开头)。Something like this should do the trick. The clause
Type = 1
specifies tables. Note that this will also include the system tables in the result set (they start with the prefix "MSys".那个对我有用
that one worked for me