GetExactPosition

HRESULT GetExactPosition(
const CBookmark& bmk, 
long& lPos);

Parameters

bmk

Self-bookmark of a row.

lPos

Reference to buffer to receive row position. Zero is returned if an error occurs. Otherwise lPos is a one-base row index.

Return Code

S_OK

Method succeeded.

E_NOINTERFACE

IRowsetExactScroll and IRowsetScroll are not available.

E_FAIL

Returned if the object is not attached.

Comments

The GetExactPosition method uses IRowsetExactScroll::GetExactPosition to retrieve the exact position of the row identified by the given bookmark. If IRowsetExactScroll is not available, IRowsetScroll::GetApproximatePosition is used to locate the approximate position of the row. Then, rows are fetched and counted at the approximate position until the row with the specified bookmark is found.