Поделиться через


CDaoRecordset::SetBookmark

Call this member function to position the recordset on the record containing the specified bookmark.

void SetBookmark(
   COleVariant varBookmark 
);

Параметры

  • varBookmark
    A COleVariant object containing the bookmark value for a specific record.

Заметки

When a recordset object is created or opened, each of its records already has a unique bookmark. You can retrieve the bookmark for the current record by calling GetBookmark and saving the value to a COleVariant object. You can later return to that record by calling SetBookmark using the saved bookmark value.

ПримечаниеПримечание.

Calling Requery changes DAO bookmarks.

Note that if you are not creating a UNICODE recordset, the COleVariant object must be explicitly declared ANSI. This can be done by using the COleVariant::COleVariant( lpszSrc**,** vtSrc ) form of constructor with vtSrc set to VT_BSTRT (ANSI) or by using the COleVariant function SetString( lpszSrc**,** vtSrc ) with vtSrc set to VT_BSTRT.

For related information, see the topics "Bookmark Property" and Bookmarkable Property" in DAO Help.

Требования

Header: afxdao.h

См. также

Основные понятия

CDaoRecordset Class

CDaoRecordset Members

Hierarchy Chart

CDaoRecordset::GetBookmark