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

IsEOF Method

Applies To

ODynaset

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();

}