0

I am building a web page (ASP.NET, using VB) and am trying to connect to a MySQL database. I can see table and field names, but cannot retrieve any data. By all other indications, it looks like the connection is working. It appears as "Open" and I can see all my tables and fields in the Server Explorer, and the connection/tables appear as an options for data-related objects. However, as soon as I click to "retrieve data" from any of the tables, I get an empty tab with nothing in it. Here's a YT video that demonstrates what SHOULD happen when I click "retrieve data"

https://youtu.be/CNCLLBhQLtE?t=401

When I try to connect any objects from the toolbox to the database (Grid View, Dropdown) I get this error:

"Could Not Create Connection

Object reference not set to an instance of an object"

Again, I can see all the tables and fields in available for selection but cannot see any data.

I downloaded an older connector to solve a solve a prior issue, so I previously its the connector that is the problem. Connector versions I have tried that have not worked:

8.0.17 (would not even connect with this version) 8.0.16 (Same error)

I had even more issues when I tried to download Visual Studio 2.0 instead.

Solutions to similar problems I have looked at that have not worked:

Visual Studio 2015 : SQL Data Source : Unable to retrieve schema. Ensure that the ConnectionString and SelectCommand properties are valid https://community.powerbi.com/t5/Desktop/Unable-to-Connect-to-MySQL-database/m-p/756449#M364509

Tim Williams
  • 154,628
  • 8
  • 97
  • 125
  • Forgot to mention - I am using Visual Studio 2019, MySQL for Visual Studio 1.2.8, and MySQL Connector Net 6.10.09. I know these are compatible with each other - https://dev.mysql.com/doc/visual-studio/en/visual-studio-install.html (MySQL doesnt list Visual Studio 2019, though) – new2this Sep 18 '19 at 21:44
  • Do you have the most recent version of mySQL installed for Visual Studio to use? – braX Sep 18 '19 at 21:50
  • Technically the most recent version is 2.0 but that version (with the latest connectors) gave me even more issues. It wouldn't even allow me to connect to the database with that version. According to that link the versions I am using should be compatible (for 2017, anyways) – new2this Sep 18 '19 at 22:03
  • I have found almost exactly the same problem here: https://stackoverflow.com/questions/48582096/issue-with-mysql-for-visual-studio-visual-studio-2017-datasource-wizard-objec?rq=1 I'm going to try downgrading MySql.Data in VS and uninstalling/reinstalling MySQL for VS and the connectors in the order given in the answer (but I've already tried the latter) – new2this Sep 18 '19 at 22:34
  • Just wondering whether the MySQL connector is configured to ignore spaces – Strawberry Sep 19 '19 at 06:50

0 Answers0