OLE DB Programmer's Reference

IRowPosition::ClearRowPosition

Clears the value of the current hRow.

HRESULT ClearRowPosition ();

Parameters

None.

Return Code

S_OK
The method succeeded. Calling GetRowPosition returns a phRow value of DB_NULL_ROW and a pdwPositionFlags value of DBPOSITION_NOROW.
E_FAIL
A provider-specific error occurred. The row position is unchanged.
DB_E_CANCELED
The operation was canceled by a client during notification. The row position is unchanged.
E_UNEXPECTED
IRowPosition::ClearRowPosition was called twice in a row.

There is no current rowset.

Comments

IRowPosition::ClearRowPosition fires the following notification phases with the reason DBREASON_ROWPOSITION_CLEARED:

Calling IRowPosition::SetRowPosition fires the remaining phases.

IRowPosition::ClearRowPosition must be called prior to the first and any subsequent IRowPosition::SetRowPosition calls.