Bulk Insert from Recordset to Table

carlmack

Registered User.
Local time
Today, 20:14
Joined
Sep 12, 2005
Messages
11
Does anybody know a way to bulk insert from a recordset to a table (assuming the same structure). I can loop round the recordset using an INSERT INTO SQL execute but I have many records and it is slow.

Is this possible using ADO or DAO ?

Carl
 
Using ADO, and the rs.ADDNEW you can use rs.UPDATEBATCH instead of rs.UPDATE and it does batch the transactions to the DB, and it does give a slight speed increase. From non-traced, gut feel I would say about 10% MAYBE increase in speed.
 
Create a temporary table that the recordset is based from, then just append the temp table to the real table.
 
Many thanks for the replies.

FoFa, Thanks alot I will give that a go.

Modest, Do you mean use a table instead of a recordset ? Unfortunately I have quite a bit of manipulation to do on the recordset so wouldn't this be slower ?

Regards

Carl
 

Users who are viewing this thread

Back
Top Bottom