0

i have to insert till 30000 record from delphi into MsAccess database using DAO. with normal insert into this take a lot of time > 10 minutes... I've read there is a procedure to insert directly from txt file (using adoCommand) but i don't understand how to made it.

Someone can help me?

Thank you for your help

  • [Googling "ms access bulk insert"](https://www.google.com/search?q=ms+access+bulk+insert) turns up [this SO post from someone using DotNet](http://stackoverflow.com/questions/7070011/writing-large-number-of-records-bulk-insert-to-access-in-net-c), maybe it gets you somewhere. The term you want is *bulk insert*. – Jan Doggen Jun 15 '15 at 19:12
  • It's worse ;-) Googling "delphi access bulk insert" shows that your question is a duplicate. – Jan Doggen Jun 15 '15 at 19:15
  • 1
    And for those who happen-upon this thread . . . when I see "bulk inserts that take a long time," I usually find that the inserts are being performed one-by-one and with "automatic transactions." In other words, a new transaction is started, *one* statement is executed, and the transaction `COMMIT`s. What you want to do is to start a transaction explicitly, insert a bunch of rows, then commit. (This is *drastically* important in SQLite . . . ) "Thirty thousand rows" is actually a fairly *minuscule* amount of data ... – Mike Robinson Jun 15 '15 at 19:26
  • thank you for your answer! perfect! – user1186213 Jun 16 '15 at 19:49

0 Answers0