Subject Re: [IBO] Forcing Bookmark
Author Paul Gallagher
Well, I'm really on a roll here fixing my own problems....

Just for kicks, I set CallbackInc to -1, and now it works. Since this is a
component descendant, it would not be a good idea to mess with the
callbackInc of the dataset. There needs to be a better solution to this.

I guess one question is, why does IBO give up so quickly on finding the
bookmark? As a temporary fix, I think I will set CallbackInc to -1 in the
component code, and set it back again after the SetBookmark call is


----- Original Message -----
From: "Paul Gallagher" <paul@...>
To: <>
Sent: Saturday, February 17, 2001 7:15 PM
Subject: Re: [IBO] Forcing Bookmark

> Strike that last message, the SetBookmark method actually IS executing. It
> is something a little different. On the line of code below in
> IBA_BDataset.IMP, on the records that are properly found with the
> it gets executed. On the ones where it does not go to the correct record,
> does not get executed. Without spending a week anylizing 100k lines of
> could someone give me a little help? The strange part is, that the
> that is being passed to SetBookmark IS valid. There must be something else
> going on here. Another interesting thing, is that when I am in debug mode,
> on codebreaks, the dataset gets completely lost, and seems to point to
> random records. Its almost like a timing thing, where it gives up looking
> for the record after a short period of time.
> TIA,
> Paul
> procedure TIB_BDataset.SetBookmark( const ABookMark: string );
> var
> OldFetchingAborted: boolean;
> begin
> CheckBrowseMode;
> if ( Bookmark <> ABookmark ) and
> ( ComponentState * [csDestroying] = [] ) then
> begin
> if Length( ABookmark ) = 0 then
> GotoBOF
> else
> begin
> OldFetchingAborted := FFetchingAborted;
> try
> FFetchingAborted := false;
> KeyFields.RowData := ABookmark;
> if not LookupKeyForFields then
> GotoBOF;
> finally
> if OldFetchingAborted then FFetchingAborted := true;
> <<<<<<<HERE>>>>>>>>>
> end;
> end;
> end;
> end;