MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 9: Row and Stream Objects


 

Chapter 9: Row and Stream Objects

OLE DB provides rowset objects for accessing information in data stores, such as relational databases, in which data is formatted into tables. However, not all structured data can easily be viewed as tables. This is especially true of heterogeneous hierarchical data such as directories and files in a file system or folders and messages in an e-mail system.

OLE DB 2.5 introduces the row object, which is an OLE DB object that contains a set of columns of data. A row object can represent a row in a rowset, the result of a singleton SQL SELECT statement, or a node in a tree-structured namespace, such as a file in a directory or a message in a mail folder.

OLE DB 2.5 also introduces the OLE DB stream object, which encapsulates the contents of files, e-mail messages, or other stream-based objects. A stream object is a specialized storage object that exposes the COM IStream interface. Stream objects are created from a row object and reference the parent object.

This chapter discusses the use of row and stream objects.

For more information on Go to
Rowset objects Chapter 4, "Rowsets"
Row objects "Row Objects" in this chapter
Creating row objects "Creating Row Objects" in this chapter
Row metadata "Row Metadata" in this chapter
Special row column DBIDs "Special Row Column DBIDs" in this chapter
Column values "Column Values" in this chapter
Transactions on row objects "Transactions on Row Objects" in this chapter
How to support row objects "Provider and Consumer Support for Row Objects" in this chapter
Stream objects "Stream Objects" in this chapter
Modeling tree-structured namespaces "Modeling Tree-Structured Namespaces" in this chapter
Direct binding in tree-structured namespaces "Direct Binding in Tree-Structured Namespaces" in this chapter
Navigating tree-structured namespaces "Navigating Tree-Structured Namespaces" in this chapter
Scoped tree manipulation operations "Scoped Tree Manipulation Operations" in this chapter
Resource rowsets and document source providers "Resource Rowsets and Document Source Providers" in this chapter
Direct binding Chapter 8, "Binder Objects and Direct Binding"

The row object cotype is defined as follows. (For more information about cotypes, see "OLE DB Objects" in Chapter 1, "Overview of OLE DB.")

CoType TRow {
   [mandatory]   interface IColumnsInfo;
   [mandatory]   interface IConvertType;
   [mandatory]   interface IGetSession;
   [mandatory]   interface IRow;
   [optional]    interface IColumnsInfo2;
   [optional]    interface IConnectionPointContainer;
   [optional]    interface ICreateRow;
   [optional]    interface IDBAsynchStatus;
   [optional]    interface IDBCreateCommand;
   [optional]    interface IDBInitialize;
   [optional]    interface IRowChange;
   [optional]    interface IRowSchemaChange;
   [optional]    interface IScopedOperations;
   [optional]    interface ISupportErrorInfo;
}

All row objects must expose the interfaces listed in the following table.

Interface Use
IColumnsInfo Provides information about the columns of the row object.
IConvertType Provides information about the data type conversions supported by the row object.
IGetSession Returns an interface pointer on the session object within whose context the row object was created.
IRow Contains methods for reading column data from a row object and for obtaining the source rowset of the row object, if one exists.