Subject Re: [IBO] TIBOQuery not always recognizing eof-state
Author Jason Wharton
Here is a source patch you can do to fix this problem.

function TIBODataset.GetRecord( Buffer: TRecordBuffer;
GetMode: TGetMode;
DoCheck: boolean ): TGetResult;
begin
Result := grOK;
case GetMode of
gmNext:
begin
// For some reason it is necessary to feel ahead.
// Otherwise a double record appears at the top of the buffer.
InternalDataset.ValidateRows( FCurRowNum + 1, FCurRowNum + 2 );
InternalDataset.BufferRowNum := FCurRowNum + 1;
if ( InternalDataset.BufferEof ) or
( InternalDataset.EofRowNum = FCurRowNum + 1 ) or // added in
this condition.
( FRecAppendEof and ( InternalDataset.BufferRowNum =
InternalDataset.EofRowNum - 1 )) then
begin
InternalDataset.BufferRowNum := FCurRowNum;
Result := grEof;
end
else

Thanks for pointing this out!

Regards,
Jason Wharton

----- Original Message -----
From: "RenéL" <rl@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, October 13, 2010 8:03 AM
Subject: Re: [IBO] TIBOQuery not always recognizing eof-state


I had hoped to hear something from Jason concerning this.
From the day after tomorrow I will be on vacation for the next 10 days.
I hope that you during this time will be able to look into the problem and
fix it.

René / SSV

--- In IBObjects@yahoogroups.com, RenéL <rl@...> wrote:
>
> Jason: I don't know if you have received my example sent as attached
> zip-file in mail directly to you.
> If not you'll find it here:
>
> http://www.ssv.dk/test/iboexample.zip
>
> To quote my email:
> Attached you will find a little example, showing the problem with
> eof-state that I mentioned.
> Extract the zip-file to your C:\ (with local server) - it will make a
> directory \IBOExample with a gdb-file, and a Delphi2010 exampleproject -
> source and compiled.
> As I said I can only reproduce the behavior - in simple demos - using
> FilterRecord, but I have seen non-filtered queries in my real app. showing
> same behaviour.
>
> Hope you're able to fix the problem.
>
> Best wishes
> René Laursen/SSV
>
>
>
> --- In IBObjects@yahoogroups.com, RenéL <rl@> wrote:
> >
> > Thanks
> > I have made a little example that I will mail directly to you.
> >
> > René/SSV
> >
>




------------------------------------

___________________________________________________________________________
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