MySQL Data Source Wizard not working on Visual Stu

2020-06-24 05:16发布

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条回答
Fickle 薄情
2楼-- · 2020-06-24 05:52

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.

查看更多
登录 后发表回答