I try to connect my Excel Spreadsheet to my MySQL DB hosted locally for the moment. I'm using WAMPSERVER.
Here is my VBA code :
Dim oConn As ADODB.Connection
Private Sub ConnectDB()
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _
"SERVER=localhost;" & _
"DATABASE=test;" & _
"USER=root;" & _
"PASSWORD=;" & _
"Option=3"
End Sub
I created my db "test" on through phpMyadmin... I have an error when I run the code. Do you have an idea?