Oracle Objects for OLE C++ Class Library Release 9.2 Part Number A95896-01 |
|
Applies To
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();
}
|
Copyright © 1998, 2002 Oracle Corporation. All Rights Reserved. |
|