Subject | Endless loop in GetFinalResult |
---|---|
Author | guido.klapperich@t-online.de |
Post date | 2001-11-07T21:12:28Z |
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
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