Subject RE: [IBO] Bug? TIB_Query.locate - AbortFetching failing
Author G. Nau
Jason,
I gave it a try with the correct logic :-)

if ( FAGen = FetchingAbortedGen ) then Break
else SysLookupNodeList

and it looks pretty good!
My sample application is running fine now. Even my real application is not
crashing anymore. i need to add some additional logic to safely detect and
handling the abortion as you described in an earlier mail.

Regards
Gunther

Am 6 Aug 2007 um 18:25 hat Jason Wharton geschrieben:

> Gunther,
>
> In the absence of a sample app, I think it is worth having you try guarding
> that call with a check of the fetching aborted level condition. If fetching
> has been aborted then there is no reason to check for a match on the node
> list.
>
> See my code change below and please test it and tell me if it works.
>
>
> while ( not Assigned( FKeyLookupRef.Node )) and
> ( not Result ) and
> ( not CursorEof ) and
> ( FAGen = FetchingAbortedGen ) and
> ( curCursorGen = FCursorGen ) do
> begin
> Inc( tmpRow );
> SysFetchNext;
> if tmpCurLevel = FKeyLookupMaxLevel then
> begin
> if tmpRow <> CursorRowNum then
> begin
> // Somehow (via callbacks) there were additional fetches
> // performed that did not pass through the code below to
> check
> // for a match. So, by checking the nodelist we see if the
> // match slipped by.
> if ( FAGen = FetchingAbortedGen ) then
> SysLookupNodeList
> else
> Break;
> end
> ...
> end;
> ...
> end;
>
>
> Hope this helps,
> Jason Wharton
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>