Has anyone had success connecting to MySQL? I have MySQL installed and I
haven't configured anything (because I don't know what to change). I
downloaded the ODBC data adapter, but I can't get a valid connection.
My Code:
---------
<WebMethod()> Public Function dbConnect() As String
Dim connString As String = "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;" & _
"DATABASE=test;" & _
"UID=test;" & _
"PASSWORD=test;" & _
"OPTION=3"
Dim MyConnection As New OdbcConnection(connString)
Try
MyConnection.Open()
MyConnection.Close()
Return connString
Catch e As Exception
Return e.Message
End Try
End Function
----------------------
It's returning the following exception: ERROR [IM002] [Microsoft][ODBC
Driver Manager] Data source name not found and no default driver specified