Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Efficient way to bulk insert into Dbase (.dbf) files

Im currently using OleDBCommand.ExecuteNonQuery (repeatedly called) to insert as much as 350,000 rows into dbase files (*.dbf) at a time from a source DataTable. I'm reusing an OleDbCommand object and OleDbParameters to set the values to be inserted each time when the insert statement is called. Inserting 350,000 rows currently takes my program about 45 mins.

Is there a more efficient way to do this? Does something similar to the Bulk Insert option used in SQL Server exist for Dbase (*.dbf) files?

like image 579
Harindaka Avatar asked Oct 11 '22 13:10

Harindaka


1 Answers

Fixed the problem by changing the OleDB driver from Jet to vfpoledb. This cut the total time from 40 mins to 8 mins.

The vfpoledb driver and merge module was downloaded from the link below

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e1a87d8f-2d58-491f-a0fa-95a3289c5fd4

Thanks for your help.

like image 94
Harindaka Avatar answered Oct 30 '22 22:10

Harindaka