Subject | Re: [IBO] bug with eof ? |
---|---|
Author | Helen Borrie |
Post date | 2004-08-31T14:36:03Z |
At 01:30 PM 31/08/2004 +0000, you wrote:
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
>Hi I have this simple code and the problem is that it will never foundNothing wrong.
>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?
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