次の方法で共有


Rowset Objects

In the Rowset programming model, the rowset is the cache that holds data returned from a data store. A rowset can be envisioned as a rectangular array of zero or more rows and one or more columns, where each column has a specific data type. In OLE DB, there are several special-purpose rowsets that provide a number of features and benefits to the data access programmer.

The rowset programming task is represented by the rowset object, which is the central object that enables all OLE DB data providers to expose data in tabular form. The rowset object contains data from the data store retrieved in response to a command or a session object method and provides means to navigate from row to row within the rowset, to examine and modify data, and to propagate any modifications back to the data store.

Values in columns, and parameters in commands, are set and retrieved using bindings and accessors. Bindings map the location of data in system and application memory and determine any data type conversions to be performed when data is moved from one to the other. Accessors are arrays of bindings that may be used by the interface methods that set or get values or parameters. For more information about accessors and bindings, see Getting and Setting Data.

The following illustration depicts a basic rowset object and its mandatory interfaces. The consumer can request other, optional interfaces to obtain more functionality. In the illustration, the row cache is the system buffer that holds information from the data store. Consumer applications use an array of row handles, a fundamental data structure in OLE DB programming, to indirectly reference row cache data.

Rowset object interfaces define groups of column bindings (IAccessor); methods to fetch and traverse rows sequentially (IRowset); and information about data type conversions (IConvertType), rowset columns (IColumnsInfo), and the rowset itself (IRowsetInfo).

Data structures supported by a generic rowset object

For more information about rowsets and rowset objects, see Rowsets.

This section contains the following topic: