Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 2 (10.2) Part Number B14308-01 |
|
Applies To
Description
This method returns an ODynasetMark on the current record.
Usage
ODynasetMark GetMark(void) const
Remarks
This method returns an ODynasetMark object referring to the current record. The current record must be valid; you cannot get a mark on a deleted record or when the dynaset is after the last record (IsEOF is TRUE) or before the first record (IsBOF is TRUE).
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 GetMark.
// open a database
ODatabase odb("ExampleDB", "scott", "tiger");
// open a dynaset
ODynaset empdyn(odb, "select * from emp");
// navigate to an interesting record
empdyn.MoveNext();
// get a mark on this record
ODynasetMark record1 = empdyn.GetMark();
// go somewhere else
empdyn.MoveLast();
empdyn.MovePrev();
// return to where we were
empdyn.MoveToMark(record1);