insert many records using ADO
Posted
by Salvador
on Stack Overflow
See other posts from Stack Overflow
or by Salvador
Published on 2010-03-23T22:05:50Z
Indexed on
2010/03/23
22:13 UTC
Read the original article
Hit count: 405
i am looking the fastest way to insert many records at once (+1000) to an table using ADO.
option 1)
using insert commands and parameters
ADODataSet1.CommandText:='INSERT INTO .....';
ADODataSet1.Parameters.CreateParameter('myparam',ftString,pdInput,12,'');
ADODataSet1.Open;
option 2)
using TAdoTable
AdoTable1.Insert;
AdoTable1.FieldByName('myfield').Value:=myvale;
//..
//..
//..
AdoTable1.FieldByName('myfieldN').value:=myvalueN;
AdoTable1.Post;
option 3)
any suggestions?
i am using delphi 7, ADO and ORACLE.
thanks in advance.
© Stack Overflow or respective owner