Subject Re: [IBO] Record not found in IBODataset.pas (fix)
Author Jason Wharton
I can't do the fix like this.
It is not generic.
At best you should only do that if the mode is rmExact.

I would like a sample case which repeats your behavior and see if there is a
real problem which can be fixed.

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


----- Original Message -----
From: "IMB T" <vatt@...>
Newsgroups: egroups.ibobjects
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, December 05, 2001 2:10 AM
Subject: [IBO] Record not found in IBODataset.pas (fix)


> Sometimes, due to resync mecanism of the TDataset, you can get a 'Record
not
> found' error (especially after filtering & ordering).
>
> Is raised in TIBODataset.GetRecord(<Buffer>, gmCurrent, ... ) when the
> cursor is at the one of the edges of the InternalDataset's buffer (see
> source).
>
> Fortunatelly is easy to fix this:
>
> procedure TIBODataset.Resync( Mode: TResyncMode );
> begin
> // It is important to prevent the Resync() process from being interrupted.
> if Active then
> begin
> InternalDataset.BeginCallbackFreeze;
>
> {Begin added code}
>
> if Bof then Next;
> if Eof then Prior;
>
> {End added code}
>
> try
> inherited Resync( Mode );
> finally
> InternalDataset.EndCallbackFreeze;
> end;
> end;
> end;
>
> HTH
>
> Perhaps Jason can add this in a next (sub)release.