dbEOF()

Database function for determining whether the data record pointer has reached the end of the record set.

Synopsis

bool dbEOF(dbRecordset recordset);

Parameters

Parameter Meaning
record set Record set reference

Return Value

The return value has the following meanings:

FALSE: the internal data record pointer is positioned at a valid data record

TRUE: the internal data record pointer is positioned after the last data record or an internal error has occurred.

Errors

TRUE is returned if an invalid record set reference has been passed.

Description

This function is used in order to check whether the last navigation operation (dbMove...) has tried to read a record after the end of the record set. One should note that because there is no error code, errors that arose when executing dbEOF() are also signalled as TRUE (i.e. no further records). If dbEOF() returns TRUE, the position of the data record pointer is undefined. Then no further record set methods can be performed and the record set must be closed and re-opened.

One should note that cannot in general be used as an indicator of an invalid data record position. In particular, after invalid operations (such as dbMove(-1) on a record set opened as "forwardOnly";) dbEOF will return "FALSE"; which does not indicate that the data record pointer is invalid.

Example

see dbOpenRecordset()

Assignment

ADO and Qt, Database functions

Availability

CTRL