Rowset Objects

OLE DB Programmer's Reference

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 Chapter 6: 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 Chapter 4: Rowsets.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net