IRowsetLocateImpl Class
Implements the OLE DB IRowsetLocate interface, which fetches arbitrary rows from a rowset.
template <
class T,
class RowsetInterface,
class RowClass = CSimpleRow,
class MapClass = CAtlMap < RowClass::KeyType, RowClass* >,
class BookmarkKeyType = LONG,
class BookmarkType = LONG,
class BookmarkMapClass = CAtlMap < RowClass::KeyType, RowClass* >
>
class ATL_NO_VTABLE IRowsetLocateImpl : public IRowsetImpl<
T,
RowsetInterface,
RowClass,
MapClass
>
Parameters
T
A class derived from IRowsetLocateImpl.RowsetInterface
A class derived from IRowsetImpl.RowClass
The storage unit for the HROW.MapClass
The storage unit for all row handles held by the provider.BookmarkKeyType
The type of the bookmark, such as a LONG or a string. Ordinary bookmarks must have a length of at least two bytes. (Single-byte length is reserved for the OLE DB standard bookmarks DBBMK_FIRST, DBBMK_LAST, and DBBMK_INVALID.)BookmarkType
The mapping mechanism for maintaining bookmark-to-data relationships.BookmarkMapClass
The storage unit for all row handles held by the bookmark.
Remarks
IRowsetLocateImpl is the OLE DB Templates implementation of the IRowsetLocate interface. IRowsetLocate is used to fetch arbitrary rows from a rowset. A rowset that does not implement this interface is a sequential rowset. When IRowsetLocate is present on a rowset, column 0 is the bookmark for the rows; reading this column will obtain a bookmark value that can be used to reposition to the same row.
IRowsetLocateImpl is used to implement bookmark support in providers. Bookmarks are placeholders (indices on a rowset) that enable the consumer to return quickly to a row, allowing high-speed access to data. The provider determines what bookmarks can uniquely identify a row. Using IRowsetLocateImpl methods, you can compare bookmarks, fetch rows by offset, fetch rows by bookmark, and return hash values for bookmarks.
To support OLE DB bookmarks in a rowset, make the rowset inherit from this class.
For information on implementing bookmark support, see Provider Support for Bookmarks in the Visual C++ Programmer's Guide and Bookmarks in the OLE DB Programmer's Reference in the PlatformSDK.
Requirements
Header: atldb.h
See Also
Reference
Provider Support for Bookmarks
Concepts
OLE DB Provider Templates (C++)
The OLE DB Provider Template Architecture