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

MoveFirst Method

Applies To

OBinder

ODynaset

Description

This method changes the current record to be the first record in the dynaset's result set.

Usage

oresult MoveFirst(void)

Remarks

This method sets the current record of the dynaset (for OBinder, the dynaset being managed by the OBinder object) to be the first record in the result set.

Execution of this method sends OADVISE_MOVE_FIRST messages to all attached advisories. One of the advisories could cancel the move, which would result in an OFAILURE return.

If the dynaset is being managed by an OBinder object, this method causes PreMove and PostMove triggers to be called.

By default, when a dynaset is created by opening an ODynaset, a MoveFirst is performed automatically.

Return Value

An oresult indicating whether the operation succeeded (OSUCCESS) or not (OFAILURE).

Example

Move to the first record in a dynaset:

// we assume that we have an open dynaset named empdyn

// Move to the first record

oresult ores = empdyn.MoveFirst();

// if ores == OSUCCESS we got there