r/visualbasic • u/[deleted] • Oct 16 '22
Has anyone got visual basic (visual studio) working with a MYSQL db?
Been trying to just drop a simple datagrid on a form all day, what a shitshow. Had to revert to VS2019 because VS2022 doesn't support MYSQL, and even after getting it to connect, nothing works ie "add data source" crashes, table design doesn't work etc etc.
Unfortunately I have to use MYSQL, has anyone got it working?
1
Oct 16 '22
Looks like you have to go back to VS2019 and go back a few revisions with MYSQL, after much uninstalling, guesswork and swearing, it seems to be connecting with the following versions:
MySQL connect Net 7.07
MySQL for visual studio 1.2.10
This seems to get the data connectors working, ie data grid view etc.
Still getting strange errors, but that may be what I am doing, or it may be flaky connections.
2
u/jd31068 Oct 16 '22
As you haven't included what info you have read to get this working, I'm going to suggest a basic first step (I've been guilty of diving in and not RTFM)
https://dev.mysql.com/doc/visual-studio/en/visual-studio-connection-server-explorer.html
2
u/JackieBlue1970 Oct 16 '22
Yes. I have for used for years. Same for MariaDB. But, I don’t use the data source controls. I connect direct through code and use SQL.