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 (for example, databases) 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.
For more information about rowsets, see the OLE DB Programmer’s Reference, Chapter 4, “Rowsets.”
The following table lists some required interfaces and optional interfaces that can be implemented for a particular rowset.
Interface | Required | Description |
IAccessor | Yes | Defines how columns are read and written when rows are accessed. |
IColumnsInfo | Yes | Exposes the most commonly used metadata about columns within a rowset. |
IConvertType | Yes | Gives information about the availability of type conversions. |
IRowset (from which all others are accessed using IUnknown::QueryInterface) | Yes | Provides methods for fetching rows sequentially, getting the data from those rows, and managing rows. |
IRowsetInfo | Yes | Provides information about a rowset. |
IColumnsRowset | No | Supplies complete information about columns in a rowset. |
IConnectionPointContainer | No | Establishes connection points for connectable objects. |
IRowsetChange | No | Updates the values of columns in existing rows, deletes existing rows, and inserts new rows. |
IRowsetFind | Yes | Allows consumers to find a row within the rowset matching a specified value. This interface is always implemented in a provider or common service component. |
IRowsetIdentity | No | Indicates that row-instance identity is implemented on the rowset and enables testing for row identity. |
IRowsetLocate | No | Fetches arbitrary rows of a rowset. A rowset that does not implement this interface is a sequential rowset. |
IRowsetResynch | No | Retrieves the values for rows that are currently visible to the transaction. |
IRowsetScroll | No | Enables consumers to fetch rows at approximate positions in the rowset. |
IRowsetUpdate | No | Enables consumers to delay commitment to changes made. |
ISupportErrorInfo | No | Indicates whether an interface supports error-handling interfaces. |
In addition to the interfaces listed above, there are also service interfaces. These service interfaces, which are particular to OLE DB data binding, are listed in the following table.
Interface | Description |
IDataSource | Provides consumers with access to multiple rowsets. |
IRowPosition | Allows multiple components to share the concept of a current row over a rowset. |