Subject Re: [ib-support] Query question
Author Lucas Franzen
Nico Callewaert schrieb:
>
> The problem is this procedure :
>
> procedure getNextRec;
> var currID: Integer;
> begin
> with mySingleQuery do
> begin
> currID := FieldByName ( 'ItemNo' ).AsInteger;
> ParamByName := currID + 1; <============================== + 1
> doesn't always work
> // with RefreshOnParamChange set to TRUE that should be all
> end;
> end;

Okay, this procedure was just a quick and dirty example.

If your SQL has a > (greater) in the comparison then the new Param
should just be the current ItemNo, not current ItemNo + 1....

Luc.