Share via


CRowset::GetApproximatePosition

Returns the approximate position of a row corresponding to a bookmark.

HRESULT GetApproximatePosition( 
   const CBookmarkBase* pBookmark, 
   DBCOUNTITEM* pPosition, 
   DBCOUNTITEM* pcRows  
) throw( );

Parameters

  • pBookmark
    [in] A pointer to a bookmark that identifies the row whose position is to be found. NULL if only the row count is required.

  • pPosition
    [out] A pointer to the location where GetApproximatePosition returns the position of the row. NULL if the position is not required.

  • pcRows
    [out] A pointer to the location where GetApproximatePosition returns the total number of rows. NULL if the row count is not required.

Return Value

A standard HRESULT.

Remarks

This method requires the optional interface IRowsetScroll, which might not be supported on all providers; if this is the case, the method returns E_NOINTERFACE. You must also set DBPROP_IRowsetScroll to VARIANT_TRUE before calling Open on the table or command containing the rowset.

For information about using bookmarks in consumers, see Using Bookmarks.

Requirements

Header: atldbcli.h

See Also

Reference

CRowset Class

IRowsetScroll::GetApproximatePosition