MySQL Data Source Wizard not working on Visual Studio 2017

落爺英雄遲暮 提交于 2020-01-22 16:41:10

问题


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.

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.

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]"

for every Table I wanted to add.

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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/52069886/mysql-data-source-wizard-not-working-on-visual-studio-2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!