command for connecting excel to mysql

K

Kero

Dear all



I am a VBA novice. I have never used it before. However, I need to write
VBA in excel to export data from spreadsheet into mysql database via
Mysql ODBC drive 3.51. I would really like to know the command for
connecting. How to write the command line by VBA. It sounds like easy
but for me it is a huge thing.



Thank you very much for your help. I really need it.

Kero
 
J

Jean-Paul Viel

Hi,



First you will need an OBDC driver for MySQL. It's free on MySQL.com



Then create your code in ADO:



adoConn.Open "Driver={mySQL}; Server=localhost; Port=3306; Option=0;
Socket=; Stmt=; Database=address; Uid=admin; Pwd=password;"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top