Subject Re: [IBO] Endless loop in GetFinalResult
Author Jason Wharton
I would like a sample app to demonstrate this for me.
Something is preventing it from getting to Eof somehow.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <guido.klapperich@...>
To: "IBObjects" <IBObjects@yahoogroups.com>
Sent: Wednesday, November 07, 2001 2:12 PM
Subject: [IBO] Endless loop in GetFinalResult


> I have a table contacts and when I do locate on the column lastname, I
> come to an endless loop. The cursor jumps wild across the dataset and I
> have to terminate the process. After some debugging, I have found where
> the endless loop starts.
> In line 1201 in IBA_BDataset.IMP: GetFinalResult( LookupKeyForFields )
> And the GetFinalResult-procedure never terminates. Here is the procedure
>
> procedure GetFinalResult( AFunct: TIB_DataFunction );
> begin
> Result := AFunct;
> if not Result and HaveFromCursor and ( FAGen = FetchingAbortedGen )
> then
> begin
> repeat
> FLocateCursor.Next;
> if FAGen <> FetchingAbortedGen then Break;
> if FLocateCursor.Eof then Break;
> Self.KeyFields.RowData := FLocateCursor.Fields.RowData;
> Result := AFunct;
> if FAGen <> FetchingAbortedGen then Break;
> until Result;
> end;
> end;
>
> Can anybody help me understanding what the procedure is doing ?
>
> Guido