Skip to content

Latest commit

 

History

History
81 lines (71 loc) · 2.49 KB

File metadata and controls

81 lines (71 loc) · 2.49 KB
title CRowset::MoveToBookmark | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic article
f1_keywords
ATL::CRowset::MoveToBookmark
ATL::CRowset<TAccessor>::MoveToBookmark
ATL.CRowset.MoveToBookmark
ATL.CRowset<TAccessor>.MoveToBookmark
MoveToBookmark
CRowset::MoveToBookmark
CRowset.MoveToBookmark
CRowset<TAccessor>::MoveToBookmark
dev_langs
C++
helpviewer_keywords
MoveToBookmark method
ms.assetid 90124723-8daf-4692-ae2f-0db26b5db920
caps.latest.revision 9
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

CRowset::MoveToBookmark

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

Syntax

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

Parameters

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.

Return Value

A standard HRESULT.

Remarks

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.

Requirements

Header: atldbcli.h

See Also

CRowset Class
CRowset::MoveNext
CRowset::MoveFirst
IRowsetLocate::GetRowsAt
CRowset::MovePrev
CRowset::MoveLast