Partager via


CRowset : : MoveToBookmark

Fetches the row marked by a bookmark or the row at a specified offset (lSkip) from that bookmark.

HRESULT MoveToBookmark( 
   const CBookmarkBase& bookmark, 
   LONG lSkip = 0  
) throw( );

Paramètres

  • bookmark
    [in] A bookmark marking the location from which you want to fetch data.

  • lSkip
    [in] The number count of rows from the bookmark to the target row. If lSkip is zero, the first row fetched is the bookmarked row. If lSkip is 1, the first row fetched is the row after the bookmarked row. If lSkip is –1, the first row fetched is the row before the bookmarked row.

Valeur de retour

A standard HRESULT.

Notes

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

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

Configuration requise

En-tête : atldbcli.h

Voir aussi

Référence

classe de CRowset

CRowset : : MoveNext

CRowset : : MoveFirst

IRowsetLocate::GetRowsAt

CRowset : : MovePrev

CRowset : : MoveLast