Hi
For connecting to the any database(DBMS) in .NET you can use ADO.NET so for this purpose first of all you need a connection string after that for using a connection string you need a connection object. For sql server you can use SqlCilent library and for other database same as MySql you can use Odbc library from .NET follow of codes illustrate it.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim ConnectionString As String = "Driver={MySQL};SERVER=.;DATABASE=NorthwindMySQL;"
Dim conn As New OdbcConnection(ConnectionString)
conn.Open()
Dim dataAdap As New OdbcDataAdapter("SELECT CustomerID, ContactName, ContactTitle FROM Customers", conn)
Dim dataset As New DataSet("Cust")
dataAdap .Fill(dataset , "Customers")
MyGrid.DataSource = dataset.DefaultViewManager
conn.Close()
End Sub
Fro more information please check the:
http://sourceforge.net/projects/vb-net-to-mysql/[
^]
and for get more information about connection strings check it:
http://connectionstrings.com/[
^]
Best Regards.