Chapter 4: Rowsets

OLE DB Programmer's Reference

This chapter explains how to create and release rowsets and how to set their properties, such as supported interfaces. Rowsets are the central objects that enable OLE DB components to expose and manipulate data in tabular form. A rowset object is a set of rows in which each row has columns of data. For example, providers present data, as well as metadata, to consumers in the form of rowsets. Query processors present query results in the form of rowsets. The use of rowsets throughout OLE DB makes it possible to aggregate components that consume or produce data through the same object.

Also explained in this chapter are ways to manage the activity of individual rows or rowsets: fetching, reference counting of row handles, and column access and reference. Rowset reference and fetching are discussed in the use of bookmarks, views, and chapters. The consumer uses bookmarks to return quickly to a row. Views can expose simple operations such as sorting or filtering a rowset. Chapters define groups of rows within a rowset. This chapter also discusses hierarchical rowsets, which are rowsets that are linked together by using chapters.

For more information on Go to
Creating rowsets "Creating Rowsets" in this chapter
Column access "Deferred Columns" and "Column IDs" in this chapter
Rows "Rows and Row Handles" 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 of hierarchical rowsets "Navigating Hierarchical Rowsets" in this chapter
Lifetime of row handles and chapters "Lifetime of Row Handles Within Chapters" in this chapter

The rowset object cotype is defined as follows. For more information about cotypes, see "Conceptual Programming Models in OLE DB" in Chapter 1, "Overview of OLE DB."

CoType TRowset {    [mandatory]   interface IAccessor;    [mandatory]   interface IColumnsInfo;    [mandatory]   interface IConvertType;    [mandatory]   interface IRowset;    [mandatory]   interface IRowsetInfo;    [optional]    interface IChapteredRowset;    [optional]    interface IColumnsInfo2;    [optional]    interface IColumnsRowset;    [optional]    interface IConnectionPointContainer;    [optional]    interface IDBAsynchStatus;    [optional]    interface IGetRow;    [optional]    interface IRowsetChange;    [optional]    interface IRowsetChapterMember;    [optional]    interface IRowsetCurrentIndex;    [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;    [optional]    interface IRowsetBookmark; }

All rowsets must expose the interfaces described in the following table.

Interface Use
IRowset Contains methods for fetching rows, getting row data, and maintaining reference counts on row handles.
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.

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