MySQL Forums
Forum List  »  MySQL for Excel

Cannot query mysql from Microsoft Excel
Posted by: Teresa Uma
Date: April 18, 2012 07:16PM

This is my Excel Macro code. I am getting the error "[ODBC Driver manager] Data Source Name not found and no default driver specified". Can anyone help.

Where i should do my configuration ?


Dim cn As New ADODB.Connection
Dim strconn As String
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
strconn = "UID=" & tUserId & ";PWD=" & tpasswd & ";" & _
"driver={MySQL ODBC 3.51 Driver};" & _
"SERVER=servername;" & _
"DATABASE=" & DataBaseName & ";"
cn.Open strconn

Set rs = New ADODB.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic

Options: ReplyQuote


Subject
Views
Written By
Posted
Cannot query mysql from Microsoft Excel
2054
April 18, 2012 07:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.