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 after the last record in the result set.
Usage
oboolean IsEOF(void) const
Remarks
This method returns TRUE if the current record is after the last record of the dynaset result set. This can happen if the MoveNext method is executed at the time that the last record is current, if the current record is the last record and it is deleted, or if there are no records in the result set.
The name means "End of File" and is a relic from flat-file databases.
Return Value
TRUE if (1) the current record is after the last record (2) the ODynaset is closed or (3) the dynaset has no records; FALSE otherwise.
Example
This example deletes all the managers.
// open a database
ODatabase odb("ExampleDB", "scott/tiger", 0);
// open a dynaset
ODynaset odyn(odb, "select * from emp");
// get an OField object for looking at the job field
OField job = empdyn.GetField("job");
// look through all the employees
while (!empdyn.IsEOF())
{
if (0 == strcmp((const char *) job, "MANAGER"))
{ // we found a manager - delete that employee
empdyn.DeleteRecord();
}
// go to next record (gets us to valid record)
// or past EOF if there are no more records
empdyn.MoveNext();
}
|
Copyright © 1998, 2002 Oracle Corporation. All Rights Reserved. |
|