MySQL Forums
Forum List  »  MySQL for Excel

connecting to mysql in excel with new release 5.2
Posted by: thomas donino
Date: February 22, 2013 04:34PM

I just upgraded to MySQL Connector/ODBC 5.2 from 5.1 and now my db connections don't work as I have wrong driver text in my functions. I've gone to their site and Googled for it but I cannot find it. Does anyone know what the new driver string is?

This is the code I used successfully before, I need a new DRIVER string for version 5.2. Any help appreciated

Public Sub ConnectDB(server As String, user As String, password As String, Optional Database As String, Optional testmode As Boolean)
On Error GoTo ErrHandler
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _
"SERVER=" & server & ";" & _
"DATABASE=" & Database & ";" & _
"USER=" & user & ";" & _
"PASSWORD=" & password & ";" & _

If testmode = True Then
MsgBox "Database Connection Test Successful!", vbInformation, "Success!"
'cmdInsertData.Enabled = True
End If
Exit Sub
MsgBox Err.Description, vbCritical, Err.Source
End Sub

Options: ReplyQuote

Written By
connecting to mysql in excel with new release 5.2
February 22, 2013 04:34PM

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.