PDA

View Full Version : How can I fill Database with VBA on Mac?



Pavel1
07-22-2014, 07:10 AM
Hello everyone!

I have a lot of files with tables. Data from these tables should be transferred to SQLite database. I'm coding on Mac, thus there are a lot of limitations. As a driver I use one from Actual Technologies.

I can easily get data from DB with QueryTables. But how can I write data to DB with it? I tried making a loop with QueryTables.Add, but:
1. It seems unreasonable to create a new QT for each row I want to write.
2. It works badly, causing General ODBC Error 1004. Probably because it attempts to send an INSERT query while the previous one is still in work (and you can't set BackgroundQuery to False with "INSERT").

So what's better to do about it? Can I insert/get data to/from Database without using QueryTables at all? ADO doesn't work on Mac.

Or how can I write data to DB with QT?

Thanks in advance!