Re: Help optimize Dataset copy code



"notradamus" <nostradumbass77@xxxxxxxxx> wrote in message
news:48245e02@xxxxxxxxxxxxxxxxxxxxxxxxx

I find it too slow, probably due to the repeated Post call.

Is there a way to /speed/ things up? Can I delay the writes or use
TClientDataset or something like that? Any inputs greatly appreciated.

In addition to the other comments, if you want to stick with ADO, try
wrapping the loop in a try..finally:

dstDataSet.DisableControls();
try
//Your while..loop
finally
dstDataSet.EnableControls();
end;

Calling DisableControls will supress any internal 'broadcast' events that
can cause performance bottlenecks.

This is a link with some additional info, but I'm not sure if we are having
internet access problems or CodeGear moved/deleted the article (it's not
coming up for me)

http://dn.codegear.com/article/27790

Good luck,
krf



.