How do I insert 800000 records into an MS Access table?

前端 未结 16 1044
故里飘歌
故里飘歌 2020-12-17 04:13

I need to insert 800000 records into an MS Access table. I am using Delphi 2007 and the TAdoXxxx components. The table contains some integer fields, one float f

16条回答
  •  再見小時候
    2020-12-17 04:56

    I would replace MS Access with another database, and for your situation I see Sqlite is the best choice, it doesn't require any installation into client machine, and it's very fast database and one of the best embedded database solution.

    You can use it in Delphi in two ways:

    1. You can download the Database engine Dll from Sqlite website and use Free Delphi component to access it like Delphi SQLite components or SQLite4Delphi

    2. Use DISQLite3 which have the engine built in, and you don't have to distribute the dll with your application, they have a free version ;-)

    if you still need to use MS Access, try to use TAdoCommand with SQL Insert statment directly instead of using TADOTable, that should be faster than using TADOTable.Append;

提交回复
热议问题