Skip Headers
Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 2 (10.2)

Part Number B14308-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

GetLastModifiedMark Method

Applies To

ODynaset

Description

This method returns an ODynasetMark on the record that was changed most recently.

Usage

ODynasetMark GetLastModifiedMark(void) const

Remarks

This method returns an ODynasetMark object referring to the last record modified. The last record modified is the last record that was edited or added.

See ODynasetMark for more information on marks.

You can use the mark with the MoveToMark method to set the current record back to the marked record.

Return Value

An ODynasetMark, which will be open on success, closed on failure.

Example

This example demonstrates GetLastModifiedMark.

// open a database

ODatabase odb("ExampleDB", "scott", "tiger");

// open a dynaset

ODynaset empdyn(odb, "select * from emp");

// add a new record

empdyn.AddNewRecord();

empdyn.SetFieldValue("empno", 9991);

empdyn.SetFieldValue("deptno", 10);

empdyn.SetFieldValue("sal", 2500);

empdyn.SetFieldValue("job", "CLERK");

empdyn.Update();

// go to the first record

empdyn.MoveFirst();

// get a mark on the last modified record

ODynasetMark markadd = empdyn.GetLastModifiedMark();

// navigate some more

empdyn.MoveNext();

empdyn.MoveNext();

// now go to the mark

empdyn.MoveToMark(markadd);

// the current record is now the record we added