MySQL Forums
Forum List  »  MySQL for Excel

Re: Connecting to MySQL via Excel problem
Posted by: Marc Wilding
Date: October 20, 2011 11:54AM

Well it has stopped working again. WTF! I am sure it was working earlier. Now I can't even connect to it in Excel.

I have a DSN which connects just fine when setting up in ODBC Sources.

But I then go to
Connect to an existing connection, I select show all from network and then select Browse for more and then connect to new data source.

I can then select ODBC DSN then my DSN which is in the list. This brings me to the connection dialogue box. I select Use data source name and select the DSN that I set up. I enter the user name and password. Click test connection and get the following


Test connection failed because of an error initializing provider - unspecified error.

When I select the provider tab Microsoft OLE DB provider of ODBC services is highlighted. I assume this is the right one as any other option does not give me the option to select a DSN.

So I tried a different way...

From excel menu I select from another source and select microsoft query. I get the error message

'The specified DSN contains an architecture mismatch between the driver and the application.'

I am absolutely baffled!!!!! I get the same error message as the last one if I try to connect via VBA which is the way I will eventually do it. My code is as follows

Set MyConnection = New ADODB.Connection

MyConnection.ConnectionString = "Driver={MySql ODBC 5.1 Driver};" & "Server=DAD=PC;" & "Option=16834;" _
& "Port=3306;" & "Stmt=;" & "DataBase=compliance;" & "Uid=marc;" & "Pwd=XXXXXXXXXX;"
MyConnection.open


Replaced my password obvioulsy :)

Any help again would be much appreciated.

Options: ReplyQuote


Subject
Views
Written By
Posted
4489
October 19, 2011 01:40AM
Re: Connecting to MySQL via Excel problem
4000
October 20, 2011 11:54AM
1955
December 28, 2011 01:26PM


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.