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

MoveLast Method

Applies To

OBinder

ODynaset

Description

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

Usage

oresult MoveLast(void)

Remarks

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

Attention: This action requires that all the records in the query be downloaded from the server, which can be expensive in time and disk space.

Execution of this method sends OADVISE_MOVE_LAST 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.

Return Value

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

Example

Move to the last record in a dynaset:

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

// Move to the last record

oresult ores = empdyn.MoveLast();

// if ores == OSUCCESS we got there

// and we downloaded all the records too (!)