OLE DB Programmer's Reference |
Returns the hRow of the current row position.
HRESULT GetRowPosition ( HCHAPTER * phChapter, HROW * phRow DBPOSITIONFLAGS * pdwPositionFlags);
Parameters
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. If an unknown value is returned in pdwPositionFlags, the consumer should assume that there is no row if phRow is set to DB_NULL_HROW and that phRow points to a valid row if it is any other value.
Return Code
ITransaction::Commit or ITransaction::Abort was called, and the object is in a zombie state.
There is no current rowset.
Comments
Before returning, the row position object calls IRowset::AddRefRows to increment the hRow's reference count and if the chapter is non-null, calls IChapteredRowset::AddRefChapter to increment the phChapter's reference count.
Calling IRowPosition::GetRowPosition prior to the first IRowPosition::SetRowPosition returns a value of DB_NULL_HROW for phRow, and a pdwPositionFlags value of DBPOSITION_NOROW.
1998-2001 Microsoft Corporation. All rights reserved.