Subject | Re: [IBO] is dataset empty |
---|---|
Author | Paul Vinkenoog |
Post date | 2004-01-06T02:01:10Z |
Hello Luc,
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.
you would miss the entire set?
Greetings,
Paul
>>>> how to emulate IsEmpty for TIB_Dataset ?Ah - I see: First behaves differently from APIFirst in this
>>> 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 ...
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