Hi,
I've done everything what is written in Internet, but still I get error. But from begining. I want to connect with MySQL DB from VBA level. I've installed ODBC connector and have made user DNS in it and have procced test, which complete successful. In Ms Visual Basic in Tools->References-> I checked Microsoft Activex Object 2.8.
My ODBC settings
By now my code looks like this
This is the error
Any ideas?
I've done everything what is written in Internet, but still I get error. But from begining. I want to connect with MySQL DB from VBA level. I've installed ODBC connector and have made user DNS in it and have procced test, which complete successful. In Ms Visual Basic in Tools->References-> I checked Microsoft Activex Object 2.8.
My ODBC settings
By now my code looks like this
Code:
Dim oConn As ADODB.Connection
Private Sub ConnectDB()
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _
"SERVER=sql.serwer;" & _
"DATABASE=mydatabase;" & _
"USER=muusername;" & _
"PASSWORD=mypassword;" & _
"Option=3"
End Sub
This is the error
Any ideas?