Subject Re: [IBO] Most Efficient Param Setting
Author Geoff Worboys
Kevin,

BeginBusy/EndBusy is upto you. If the process does a lot of
iterations then it can be better visually and for performance (its
amazing how may CPU cycles are consumed turning the cursor on and
off).

If the qryOrdDtlC is only used in the code loop, consider using
TIB_Cursor instead (I presume it is a TIB_Query from its name).

Where you have multiple parameters to update inside a loop use
something like...

Params.BeginUpdate;
try
Params...
Params...
finally
Params.EndUpdate(True);
end;


> If NOT qryOrdDtlC.Active then qryOrdDtlC.Open
> Else qryOrdDtlC.Refresh;

I would replace this with just...

qryOrdDtlC.First;

AFAICT the main difference between this and doing a Refresh in this
situation is that Refresh tries to consider the RefreshAction
property. First is easier and says explicitly that I want to see the
first row of the result set (whereas Refresh can conceivably not land
you on the first row depending on the properties and circumstances).



Geoff Worboys
Telesis Computing