IRowPosition::GetRowPosition

Returns the hRow of the current row position.

HRESULT GetRowPosition (
HCHAPTER *      hChapter,
HROW *         phRow
DBPOSITIONFLAGS *   pdwPositionFlags);

Parameters

hChapter [out]

The chapter associated with the current row, or DB_NULL_HCHAPTER if the rowset is not chaptered.

phRow [out]

A pointer to memory in which to return the hRow of the current row position, or DB_NULL_HROW if there is no current row position.

pdwPositionFlags [out]

A flag indicating additional information about the row position.

Value Meaning
DBPOSITION_OK hRow specifies the current row position.
DBPOSITION_NOROW hRow is DB_NULL_HROW, and the current row position is undefined.
DBPOSITION_BOF hRow is DB_NULL_HROW, and the row position is before the beginning of the rowset.
DBPOSITION_EOF hRow is DB_NULL_HROW, and the row position is off the end of the rowset.

Additional values for this flag may be defined in the future. Consumers should be prepared to handle other values for this flag by relying only on the value of phRow for undefined values of pdwPositionFlags.

Return Code

S_OK

The method succeeded. 

E_FAIL

The interface has not been initialized.

Comments

Before returning the hRow, the RowPosition object calls AddRefRows to increment the reference count of the hRow.