I was looking for a way to use the database connection wizard in express 2008 vb.net. It wouldn't let me add the MySQL service. Also, it only gave me 3 database options to connect to, none of which was MySQL.
Probably a limitation build into the Express version. Connect to it from within code instead of the wizard. You can find connection strings at connectionstrings.com
which one, there seems to be a lot of .net strings. Its a local connection, so I shouldn't need to worry about inlcuding a port number. I saw a .net oledbconnection but I thought oledb was for access. Well, I'll try one and see what happens.
I've never used MySQL, so I don't know which is the most common method for connecting. OLEDB is used for much more than Access. Most modern DBMS's provide an OLEDB driver. You'll want to go with one of the drivers which is installed on your system.
You need to connect via code, I find this to be the easiest way.
Here's an example:
Module MyModule
Public CONN As New Data.Odbc.OdbcConnection("DSN=MyDSN;DATABASE=MyDB;USER=DBUser;PASSWORD=DBPassword")
Public ADP As New Data.Odbc.OdbcDataAdapter("", CONN)
Public CMD As New Data.Odbc.OdbcCommand("", CONN)
End Module
You also need to set up your ODBC connection from Windows Administrative Tools. Just add a new User DSN with a MySQL ODBC driver where you specify which DB, user, password and of course, DSN name.
I hope this helps and that it can be understood, it has been a while since I last posted a response, so I'm a little bit rusty.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.