Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mySQL and VB.Net

Status
Not open for further replies.

gghorseman

Programmer
Joined
Feb 1, 2003
Messages
2
Location
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top