Inserts so slow using _Connection.Execute



Can any one help here? I have the following job to do - which works but sooo
slow.
D7 - SQL 2K to different databases on 2 different servers.
I connect to the first server / database using _Recordset and _Connection
and pull back 50000 records in about .5 sec. This is fine. I then need to do
some work on this record set and then insert these records into a different
database on a different server. I use another _Connection to do the
following
While Not FromRecordSet.EOf do
begin
// process the records

end
Instr := 'Insert ['+tablename+'] values (' + stemp + ')';
ToConnection.Execute(Instr,recs,-1)
FromRecordSet.MoveNext
end;// While not eof
The insert takes about 30 seconds to do this with 50000 records. This is way
to slow. I could get the same performance using TTAbles. I want this
application to be a console app when it's finished so don't need any fancy
gui stuff.

any help would be appreciated.
regards
steve


.



Relevant Pages

  • Re: Cannot remove flash memory
    ... I did not see a dismount command on the GUI. ... it's true that you can pull off a device when nothing is ... So the very thing to do is to unmount your disk to be sure that nothing ... window did not have anything on it either. ...
    (Ubuntu)
  • Re: NotComing to NotWigan. Shite! Shite! Shite!
    ... > Seeing as Steve has unfortunately had to pull out at short notice, ... > anyone else fancy having a go at vocals/lead guitar on "I'll feel a whole ...
    (uk.music.guitar)
  • Re: GUI vs: CLI (was: Shell command in VB6)
    ... >> I think it says more about gswork's preferences than it does about GUI vs ... > then uses the mouse to pull up the logoff option. ... > than a CLI. ... but without those GUI methods he'd be helpless in the first ...
    (comp.programming)
  • Re: No call for Ada
    ... What I'd imagine doing would be to pull together an integrated kit that ... supported a GUI, Database and Class Library. ...
    (comp.lang.ada)
  • Re: need help from the pros!
    ... To each as they fancy. ... pull out by the roots when we set up. ... Prev by Date: ...
    (rec.crafts.textiles.quilting)