Is there any faster way to iterate through an ADO Dataset than
while (not ADOQuery1.Eof) do
begin
/* Do something */
ADOQuery1.Next;
end;
I need to scan a dataset of around 9000 items and only extract records matching a pre-defined set of branch numbers.
Be sure that you use DisableControls/EnableControls if it's not necesary for not spend time updating visible controls associated at DataSet.
try
ADOQuery1.DisableControls;
while (not ADOQuery1.Eof) do
begin
/* Do something */
ADOQuery1.Next;
end;
finally
ADOQuery1.EnableControls;
end;
Regards.