MySQL数据源向导不适用于Visual

MySQL数据源向导不适用于Visual

本文介绍了MySQL数据源向导不适用于Visual Studio 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在同一台PC上安装了Visual Studio 2017社区和MySQL社区8.0.12.它还配备了适用于Visual Studio 2.0.5的MySQL和MySQL Connector/NET 8.0.12.

I have Visual Studio 2017 Community installed, and MySQL Community 8.0.12 on a same PC. It is also equipped with MySQL for Visual Studio 2.0.5 and MySQL Connector/NET 8.0.12.

现在,使用Visual Studio中的DataSource向导.我能够测试与服务器的连接,然后选择要添加到DataSetTables.

Now, using the DataSource Wizard in Visual Studio. I was able to test the connection to my server and select which Tables that I wanted to add to the DataSet.

但是,当我单击Finish时,出现以下错误:

However when I click Finish, a following errors showed up:

"Some updating commands could not be generated automatically. The database returned the following error: Unexpected Error"

这之后是另一个错误日志:

This is followed by another error log:

"Could not retrieve schema information for table or view [tablename]"

我要添加的每个Table.

我已经查看了有关上述错误的一些信息,但是到目前为止,他们正在谈论Visual Studio和MySQL的旧版本.任何帮助将不胜感激.谢谢.

I already looked up to some information regarding the said errors, but so far they are talking about older version of Visual Studio and MySQL. Any help will be appreciated. Thank you.

推荐答案

因此,在经过一些摆弄并浏览MySQL官方网站后,我将我的Connector/NET降级到6.9.8版,并将MySQL for Visual Studio也降级到了.版本1.2.7

So after some fiddling and looking into MySQL official website, I downgraded my Connector/NET to version 6.9.8, and downgraded the MySQL for Visual Studio as well to version 1.2.7

现在,数据源可以获取表定义,等等.

Now the DataSource is able to get table definitions and so on.

每当按下DataSource向导中的完成"按钮时,仍然会出现一个小错误,该错误显示无法添加指定的关系强制转换无效"..

Still a minor error shows up whenever the "FINISH" button in DataSource wizard is pressed, that shows up "Failed to add relation(s) Specified cast is not valid".

但是,此错误不会阻止创建和使用数据源.我仍然不确定是什么导致了此错误.

This error however doesn't prevent the DataSource to be created and used. I'm still not sure what caused this error though.

这篇关于MySQL数据源向导不适用于Visual Studio 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 21:26