Skip navigation links

User Comments

Posted by John Walker on September 11 2008 5:06pm[Delete] [Edit]

This code (first routine: to create a small table) has a small bug--or at least it didn't work out of the box for me in VBA Excel 2002. To fix, on the first addition you'll need to insert a value for id, something like

rs!id = 4

Posted by Luis Guillermo Quevedo on February 21 2010 1:53am[Delete] [Edit]

Hi The ADO code didn´t work properly on my PC. I use Win2003 sp4, and the server is Apache (Wamp distribution).

I registred a DSN and change the sample code to
Set conn = ws.OpenConnection("Valid_DSN_NAME", _
dbDriverNoPrompt, False, strCnn)

Then it works. The connection was created.

Note 1: the server must be running. I prooved to disable the apache server and activate mysql alone, as a service and the code could not create the connection.
Note 2: u must use the user, dbname and pwrd you had used to create the dsn.

Posted by Bill Wilkinson on May 25 2011 3:28am[Delete] [Edit]

If you downloaded Connector/ODBC 5.1 then the connection string should *NOT* be

"DRIVER={MySQL ODBC 3.51 Driver};"_

Instead, it should be

"DRIVER={MySQL ODBC 5.1 Driver};"_

Posted by Richard van Dulken on February 20 2012 2:19pm[Delete] [Edit]

It is really nice to see all these micro$oft examples but if the connector/ODBC is supplied for unix why isn't there an example of how to use it on unix with demo code?

Posted by afdoal wahyurrahman on May 10 2012 10:17am[Delete] [Edit]

what the "OPTION=3" on the connection string??

how to use other option on the connection string like
FLAG_AUTO_RECONNECT
FLAG_AUTO_IS_NULL
FLAG_NO_CACHE

in one connection string???

Flag source: http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connection-parameters.html

Posted by Max Wikström on September 26 2012 8:33am[Delete] [Edit]

Connection string details for this driver can be found here,
http://www.connectionstrings.com/mysql#mysql-connector-odbc-5-1

Add your own comment.