ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   can I use excel vba to write tables to a mysql database? (https://www.excelbanter.com/excel-programming/340581-can-i-use-excel-vba-write-tables-mysql-database.html)

munder

can I use excel vba to write tables to a mysql database?
 
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

Bob Phillips[_6_]

can I use excel vba to write tables to a mysql database?
 
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....oviderForMySQL

--
HTH

Bob Phillips

"munder" wrote in message
...
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





All times are GMT +1. The time now is 05:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com