Skip Headers

Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 1 (10.1)

Part Number B10119-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

IsBOF Method

Applies To

ODynaset

Description

This routine returns TRUE if the current record is before the first record in the result set.

Usage

oboolean IsBOF(void) const

Remarks

This method returns TRUE if the current record is before the first record of the dynaset result set. This can happen if the MovePrev method is executed at the time that the first record is current, or if there are no records in the result set.

The name means "Beginning of File" and is a relic from flat-file databases.

Return Value

TRUE if (1) the current record is before the first record, (2) the ODynaset is closed, or (3) the dynaset has no records; FALSE otherwise.

Example

This example traverses a dynaset record set from the last record to the first.

// open a database

ODatabase odb("ExampleDB", "scott", "tiger");

// construct and open the ODynaset

ODynaset odyn(odb, "select * from emp order by empno");

// go to the end

odyn.MoveLast();

// and go through all the records

while (!odyn.IsBOF())

{

// process the record

// go to the previous record

odyn.MovePrev();

}