ODBC 5.1 数据库中没有任何内容
我正在使用 VS2005 并尝试使用 MySQL 的 ODBC 连接到数据库。
问题是,当我进入选择要使用哪些表的部分时,没有表,唯一可选择的东西是视图,它没有名称并且为空(当然,这样的东西并不真正存在于D B)。 我尝试使用 SQL 语句添加表适配器,这显然工作得很好(还尝试添加 Datagridview 以确保它不是海市蜃楼并且工作完美)if 我输入整个事情,但在查询生成器中,它没有显示任何可供选择的表(同样,如果我键入表的名称,它会出现,但仍然不显示其列)。 此外,如果我选择“视图”选项卡,我会收到以下消息:
查询生成器无法
尝试读取或写入受保护的内存。 这通常表明其他内存已损坏。
如果使用手写 SQL 语句不起作用,我可能会相信它,但显然这不是问题所在。 所以我的问题是:这是怎么回事? 有人听说过这样的问题吗? 更重要的是:有人知道如何解决这个问题吗?
I'm working on VS2005 and have tried using MySQL's ODBC to connect to a database.
The problem is that when I get to the part of choosing which tables to use, there are no tables and the only selectable thing is a View, which has no name and is null (of course something like this doesn't really exist in the DB). I tried adding a Table adapter using SQL statements, which apparently works perfectly (tried also adding a Datagridview to make sure it's not a mirage and it worked perfectly) if I type the whole thing, but in the query builder it doesn't show me any tables to choose from (again if I type the name of the table, it appears but it still doesn't show it's columns). Also if I select the "Views" Tab, I get the following message:
The query builder failed
Attempt to read or write protected memory. This is often an indication that other memory is corrupt.
If it wouldn't work using the hand typed SQL statements, I may have believed it, but apparently that is not the problem. So my question is: What is going on here? Anyone has ever heard of an issue like this? And even more important: Does anyone know how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该启用 ODBC 日志记录并查看日志
替代文本 http://img142.imageshack。 us/img142/1667/20090727225415.png
您可能会发现有用的 odbctest 实用程序
http://msdn.microsoft.com/en-我们/库/ms712676%28VS.85%29.aspx
它随 MDAC 一起安装,或者可以从 http://www.datadirect 下载。 com/support/downloads/tools/index.ssp
You should enable ODBC logging and check out the log
alt text http://img142.imageshack.us/img142/1667/20090727225415.png
And you might find useful odbctest utility
http://msdn.microsoft.com/en-us/library/ms712676%28VS.85%29.aspx
It is installed with MDAC or can be downloaded from http://www.datadirect.com/support/downloads/tools/index.ssp