can I use excel vba to write tables to a mysql database?

G

Guest

Hello
I receive data in dbf format. I open the files in Excel and modify them as
necessary. I want then to squirt the data into tables in a mysql database. I
want that bit to be fully automatic, so assumed I would use VBA and ODBC. Any
ideas?
Thanks
 
B

Bob Phillips

You can use ADO and SQL to do so.

http://support.microsoft.com/default.aspx?kbid=295646
How To Transfer Data from ADO Data Source to Excel with ADO

http://support.microsoft.com/default.aspx?kbid=278973
SAMPLE: ExcelADO Demonstrates How to Use ADO to Read and Write Data in Excel
Workbooks

http://support.microsoft.com/default.aspx?kbid=257819
How To Use ADO with Excel Data from Visual Basic or VBA


Also see Carl Prothman' site
http://www.carlprothman.net/Default.aspx?tabid=81for connection strings.
MySQL even has an OLE DB provider so you can use that rather than ODBC
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMySQL
 

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