Subject RE: [IBO] TIB_Cursor . . . IsEmpty?
Author Helen Borrie
At 09:37 AM 10/09/2006, you wrote:
>OK, yes thanks that answers it. :)
>
>I noticed with Tquery when I tested EOF I didn't allways get true if empty
>and so I started using IsEmpty (and still use it with TIBOQuery).
>
>Was it necessary for me to call First before testing EOF with Tquery also?

No; because the Open method of TQuery/TIBOQuery goes to the first
record if there is one.

With TIB_Cursor, it is just an open cursor that is not on any record
until you call First (to fetch the first record from the server's buffer).

EOF and BOF are not on any record (be it a buffered set or not). BOF
is a logical "position" before the first record, while BOF is a
logical "position" past the last record. So, if you call First on an
unbuffered set and EOF is true, then it must be an empty set.

All IsEmpty does is test whether both BOF and EOF are true.

Helen