Subject Re: [IBO] is dataset empty
Author Paul Vinkenoog
Hello Luc,

>>>> how to emulate IsEmpty for TIB_Dataset ?

>>> For TIB_Cursors I use: EOF AND BOF.
>>> If this is true, it's empty.

> Of course I'll do a FIRST first ;-)
>
> In fact it always looks like:
>
> with myCursor do
> begin
> if not Prepared then Prepare;
> First;
> if EOF AND BOF then ...

Ah - I see: First behaves differently from APIFirst in this
respect. After APIFirst on an empty dataset, Eof is true but
Bof false.

Anyhow, after a First (or an APIFirst) testing for Eof alone should
suffice: if the set has records, you'll be at the first one and
Eof = false.

> AutoFetchAll is NEVER set to true with my Cursors.

Same here. I wonder would would happen if you'd set it to true - guess
you would miss the entire set?


Greetings,
Paul