Subject Re: [IBO] bug with eof ?
Author Helen Borrie
At 01:30 PM 31/08/2004 +0000, you wrote:
>Hi I have this simple code and the problem is that it will never found
>the Eof condition.
>
> TIB_Query *tbl = static_cast <TIB_Query*> (dmUsers->queUsers);
>
> if (!tbl->Prepared) tbl->Prepare();
> tbl->First();
> while (!tbl->Eof){
> //some action
> tbl->Next();
> }
>
>the SQL of the IB_Query has the following:
>
>SELECT ID
> , ID_USUARIO
> , HUELLA
> , NOTAS
>FROM USUARIO_HUELLAS
>
>
>What I am doing wrong?

Nothing wrong.
while (!tbl->Eof){
will never focus on the EOF because Next() will not be called if the cursor
is on the last record. You will be at EOF when the loop completes.

BOF and EOF are "theoretical positions".

Helen