We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Call this member function to determine the persistence of bookmarks on a recordset object after certain operations.

DWORD GetBookmarkPersistence( ) const;

A bitmask that identifies the operations through which bookmarks persist on a recordset object. For details, see Remarks.

For example, if you call CRecordset::GetBookmark and then call CRecordset::Requery, the bookmark obtained from GetBookmark may no longer be valid. You should call GetBookmarkPersistence before calling CRecordset::SetBookmark.

The following table lists the bitmask values that can be combined for the return value of GetBookmarkPersistence.

Bitmask value

Bookmark persistence


Bookmarks are valid after a Requery operation.


The bookmark for a row is valid after a Delete operation on that row.


Bookmarks are valid after a Close operation.


Bookmarks are valid after any Move operation. This simply identifies if bookmarks are supported on the recordset, as returned by CRecordset::CanBookmark.


Bookmarks are valid after a transaction is committed or rolled back.


The bookmark for a row is valid after an Update operation on that row.


Bookmarks associated with one recordset object are valid on a second recordset.

For more information about this return value, see the ODBC API function SQLGetInfo in the Windows SDK. For more information about bookmarks, see the article Recordset: Bookmarks and Absolute Positions (ODBC).

Header: afxdb.h