Hello, I have been reading up on how to get vb.net to use oledb to access a mysql server.
I saw a post saying I can use this:
http://dev.mysql.com/downloads/connector/net/1.0.html
So I installed that (I didnt configure anything past that.. like I normally would with DSN).
And here is my code:
and the program errors out saying:
An unhandled exception of type System.InvalidOperationException occurred in system.data.dll
Additional information: The MySQLProv provider is not registered on the local machine.
Do youll have any ideas?
thanks for any pointers!
Lee
I saw a post saying I can use this:
http://dev.mysql.com/downloads/connector/net/1.0.html
So I installed that (I didnt configure anything past that.. like I normally would with DSN).
And here is my code:
Code:
Dim FirstName
Dim MyConnection As OleDbConnection
Dim connString As String = "Provider=MySQLProv;" & "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=192.168.254.7;" & "DATABASE=test;" & "UID=picture;" & _
"PASSWORD=frame;" & "OPTION=3"
MyConnection = New OleDbConnection(connString)
MyConnection.Open()
MyCommand.Connection = MyConnection
Dim MyCommand As New OleDbCommand("SELECT * FROM Users;", MyConnection)
Dim MyReader As OleDbDataReader = MyCommand.ExecuteReader()
While MyReader.Read
Lastname.Text = MyReader("Lastname")
FirstName = MyReader("Firstname")
Address.Text = MyReader("Address")
End While
MyConnection.Close()
and the program errors out saying:
An unhandled exception of type System.InvalidOperationException occurred in system.data.dll
Additional information: The MySQLProv provider is not registered on the local machine.
Do youll have any ideas?
thanks for any pointers!
Lee