MDAC 2.5 SDK - OLE DB Providers
Cursor Service for OLE DB


 

Using the Cursor Service: A Closer Look

See Also    Interfaces                Related Topics

The Cursor Service consumes data from a rowset, caches it locally, and exposes the data along with data-manipulation functionality through rowset interfaces. The Cursor Service can provide a local instance of virtually any rowset produced by an application: It is responsible for providing the buffering of the original data, changed data, last read (underlying) data, and metadata, and for exposing the data as an OLE DB rowset. It provides common rowset functionality such as scrolling, buffering, and notifications on top of the buffered data.

The rowset object to be used by the Cursor Service is populated by reading data from the underlying (original) rowset. The Cursor Service determines basic column information, such as number of columns, type, and label, and then reads the data from the rowset. After the Cursor Service retrieves extended metadata information by using the IColumnsInfo and IColumnsRowset interfaces, it closes the underlying rowset. IColumnsRowset::GetColumnsRowset, if supported by the provider, returns the following column information (if not supported, the Cursor Service attempts to retrieve column information by using IColumnsInfo):

For more information about these columns, see "Optional Metadata Columns" in the OLE DB Programmer's Reference.

The Cursor Service is typically invoked when the consumer requests a local copy of a remote rowset or when the consumer requests rowset functionality not supported by the provider's native rowset.

All rowsets are handled independently by the Cursor Service. Rowsets do not share common data, and no integrity constraints are enforced. The Cursor Service does not try to replicate the provider data model, its integrity restrictions, or its data. Instead, it manipulates independent data sets as defined and required by the application by providing the following functions: data fetching, data manipulation, local updates, and local rowsets.