Hi,
I am trying to connect to a hosted MySQL database running 5.0.96 so I have installed the latest driver from MySQL site "Connector/ODBC 5.2.6".
But I get this error:
[Microsoft][ODBC Manager] Data source name not found and no default driver specified.
I am able to connect if I use the ODBC connection directly.
Any suggestions?
So here a sample of my code:
Dim oConn As ADODB.Connection
Dim Server_Name As String
Dim User_Name As String
Dim Password As String
Dim Database_Name As String
Server_Name = Sheets("_config").Range("B2").value
User_Name = Sheets("_config").Range("B3").value
Password = Sheets("_config").Range("B4").value
Database_Name = Sheets("_config").Range("B5").value
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 5.0.96 Driver};" & _
"SERVER=Server_Name;" & _
"DATABASE=Database_Name;" & _
"USER=User_Name;" & _
"PASSWORD=Password;" & _
"Option=3"
I am trying to connect to a hosted MySQL database running 5.0.96 so I have installed the latest driver from MySQL site "Connector/ODBC 5.2.6".
But I get this error:
[Microsoft][ODBC Manager] Data source name not found and no default driver specified.
I am able to connect if I use the ODBC connection directly.
Any suggestions?
So here a sample of my code:
Dim oConn As ADODB.Connection
Dim Server_Name As String
Dim User_Name As String
Dim Password As String
Dim Database_Name As String
Server_Name = Sheets("_config").Range("B2").value
User_Name = Sheets("_config").Range("B3").value
Password = Sheets("_config").Range("B4").value
Database_Name = Sheets("_config").Range("B5").value
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 5.0.96 Driver};" & _
"SERVER=Server_Name;" & _
"DATABASE=Database_Name;" & _
"USER=User_Name;" & _
"PASSWORD=Password;" & _
"Option=3"