Subject | RE: [IBO] never reach EOF |
---|---|
Author | Jason Wharton |
Post date | 2004-11-23T23:51:36Z |
What function are you expecting of EOF here?
It's job is to tell you when no more records are available from the server
and it will pull records from the server automatically as it wishes to.
Jason
It's job is to tell you when no more records are available from the server
and it will pull records from the server automatically as it wishes to.
Jason
> -----Original Message-----
> From: rick_roen [mailto:rick@...]
> Sent: Tuesday, November 23, 2004 3:30 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] never reach EOF
>
>
>
>
> I encountered a problem when iterating through a TIB_Query where I
> never reached EOF.
>
> I've distilled it down to the following:
>
> procedure TFormCustomerMaintenance.Button1Click(Sender: TObject);
> var
> Count: word;
> begin
> Count := 0;
> DMCM1.QBillto.First;
>
> while not DMCM1.QBillto.BufferEof do begin
> DMCM1.QBillto.BufferNext;
> inc( Count );
> if Count > 500 then
> Break;
>
> end;
> ShowMessage( inttostr( Count ) );
>
> Count := 0;
> DMCM1.QBillto.First;
>
> while not DMCM1.QBillto.Eof do begin
> DMCM1.QBillto.Next;
> inc( Count );
> if Count > 500 then
> Break;
>
> end;
> ShowMessage( inttostr( Count ) );
> end;
>
> The first count returns correctly with 96 using the BufferEOF.
>
> The second count "Breaks" and returns 501.
>
> Is EOF not functional in IB_Query?
>
> Rick
>