Overview of Rowsets

A rowset is simply a set of rows in which each row has columns of data. This chapter explains how to create and release rowsets, as well as how to set their properties, such as supported interfaces. Also presented is a description of how to manage the activity of individual rows or rowsets: fetching, reference-counting handles, and column access and reference. Rowset reference and fetching are discussed in the use of bookmarks of various types, chapters, and views. Bookmarks allow the consumer to return quickly to a row, chapters identify a group of rows within a rowset, and a view can expose simple operations such as sorting or filtering a rowset. Hierarchical rowsets are those linked together by using chapters. The interfaces, navigation, properties, lifetime, and notifications when using hierarchical rowsets are all discussed.

For more information on Go to
Creating and releasing rowsets "Creating and Releasing Rowsets" in this chapter
Setting properties of rowsets "Setting Rowset Properties" in this chapter
Column access "Deferred Columns and Column IDs" in this chapter
Rows "Rows" in this chapter
Fetching rows "Fetching Rows" in this chapter
Bookmarks "Bookmarks" in this chapter
Chapters "Chapters" in this chapter
Views "Views" in this chapter
Hierarchical rowsets "Hierarchical Rowsets" in this chapter
Navigation "Navigating Hierarchical Rowsets" in this chapter
Properties of hierarchical rowsets "Setting Properties on Hierarchical Rowsets" in this chapter
Lifetime of rowsets "Lifetime of Row Handles and Chapters" in this chapter

Rowsets are the central objects that enable all OLE DB data providers to expose data in tabular form. Conceptually, a rowset is a set of rows in which each row has columns of data. Base table providers present their data in the form of rowsets. Query processors present query results in the form of rowsets. This makes it possible to layer components that consume or produce data through the same object.

Rowsets:

CoType TRowset {
   [mandatory] interface IAccessor;
   [mandatory] interface IColumnsInfo;
   [mandatory] interface IConvertType;
   [mandatory] interface IRowset;
   [mandatory] interface IRowsetInfo;
   [optional]  interface IChapteredRowset;
   [optional]  interface IColumnsRowset;
   [optional]  interface IConnectionPointContainer;
   [optional]  interface IDBAsynchStatus;
   [optional]  interface IRowsetChange;
   [optional]  interface IRowsetFind;
   [optional]  interface IRowsetIdentity;
   [optional]  interface IRowsetIndex;
   [optional]  interface IRowsetLocate;
   [optional]  interface IRowsetRefresh;
   [optional]  interface IRowsetScroll;
   [optional]  interface IRowsetUpdate;
   [optional]  interface IRowsetView;
   [optional]  interface ISupportErrorInfo;
}

The most basic rowset exposes the following interfaces:

IRowset Contains methods for fetching rows in the rowset sequentially.
IAccessor Permits the definition of groups of column bindings describing the way tabular data is bound to consumer program variables.
IColumnsInfo Provides information about the columns of the rowset.
IRowsetInfo Provides information about the rowset itself.
IConvertType Provides information about the data type conversions supported by the rowset.

Using IRowset, a consumer can sequentially traverse the rows in the rowset, including traversing backward if the rowset supports it.