Subject Re: [IBO] Bof and Eof Problem
Author paulhope@allcomm.co.uk
Chris

Your'e right - IBO doesn't use EOF BOF like the BDE. This is what I
do if I'm moving a rows remotely

with ib_query do
if RowNum > 1 then Prior;

with ib_query do
if RowNum < BufferRowCount then Next;

(sorry I can't do wierd C syntax)

IMO IBO should allow

if not EOF then Next
and
if not BOF then Prior

without it getting lost in no rows land.

Regards
Paul

--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> Here's how most people's loops look.
>
> with my query do begin
>
> Open;
> while not Eof do begin
> ...
> Next;
> end;
> end;
>
> What would happen if once the record hit the last row if it also
reported
> Eof = true?
>
> From what I can tell, you would not process the last row because
the loop
> would be exited.
>
> I think the behavior of Bof and Eof should be the same.
>
> You need to change your logic to probe for Eof and Bof and avoid it
> accordingly.
>
> HTH,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Chris Hulsey" <chulsey@v...>
> To: <IBObjects@y...>
> Sent: Monday, March 26, 2001 1:43 PM
> Subject: [IBO] Bof and Eof Problem
>
>
> > Hello All,
> >
> > I am in the process of converting over to IBO from the BDE. I
replaced a
> TTable with the TIB_Query. I load the TIB_Query with a SQL string
like
> "SELECT * FROM TICKET_INFORMATION ORDER BY ACTIVE_DATE
DESCENDING". It
> fetches the records but the Bof and Eof don't seem to work
properly. The
> don't seem to realize that I am on the first or last record until I
go past
> them.
> >
> >
> > void __fastcall TForm_TripleWindow::Button_ScrollPreviousClick(
> > TObject *Sender)
> > {
> > if (!Query_TicketInformation->Bof)
> > {
> > Query_TicketInformation->Prior();
> > PopulateTicketCaption();
> > PopulateTicketDetail();
> > }
> > }
> >
> > void __fastcall TForm_TripleWindow::Button_ScrollNextClick(TObject
> *Sender)
> > {
> > if (!Query_TicketInformation->Eof)
> > {
> > Query_TicketInformation->Next();
> > PopulateTicketCaption();
> > PopulateTicketDetail();
> > }
> > }
> >
> > Chris Hulsey
> > chulsey@v...