gghorseman
Programmer
I am having trouble connecting to mySQL using VB.Net. I have downloaded the 3.51 ODBC driver and the ODBC .NET stuff. When I try this simple code, I get an error that doesn't give enough info to help much.
Imports Microsoft.Data.Odbc
Module Module1
Sub Main()
Dim MyConString As String
Dim myConnection As OdbcConnection
MyConString = "DRIVER=(People 3.51);SERVER=localhost;DATABASE=test;"
myConnection = New OdbcConnection(MyConString)
myConnection.Open()
End Sub
End Module
Where People 3.51 is the DSN name. The error is:
An unhandled exception of type 'Microsoft.Data.Odbc.OdbcException' occurred in microsoft.data.odbc.dll
Additional information: System error.
Help would be appreciated.
Imports Microsoft.Data.Odbc
Module Module1
Sub Main()
Dim MyConString As String
Dim myConnection As OdbcConnection
MyConString = "DRIVER=(People 3.51);SERVER=localhost;DATABASE=test;"
myConnection = New OdbcConnection(MyConString)
myConnection.Open()
End Sub
End Module
Where People 3.51 is the DSN name. The error is:
An unhandled exception of type 'Microsoft.Data.Odbc.OdbcException' occurred in microsoft.data.odbc.dll
Additional information: System error.
Help would be appreciated.