Row and Stream Objects (OLE DB)

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 section discusses the use of row and stream objects.

For more information on

Go to

Rowset objects

Rowsets

Row objects

Row Objects (OLE DB)

Creating row objects

Creating Row Objects

Row status

DBROWSTASTUS Enumerated Type (OLE DB)

Row metadata

Row Metadata

Special row column DBIDs

Special Row Column DBIDs

Column values

Column Values

Transactions on row objects

Transactions on Row Objects

How to support row objects

Provider and Consumer Support for Row Objects

Stream objects

Stream Objects (OLE DB)

Modeling tree-structured namespaces

Modeling Tree-Structured Namespaces

Direct binding in tree-structured namespaces

Direct Binding in Tree-Structured Namespaces

Navigating tree-structured namespaces

Navigating Tree-Structured Namespaces

Scoped tree manipulation operations

Scoped Tree Manipulation Operations

Resource rowsets and document source providers

Resource Rowsets and Document Source Providers

Direct binding

Binder Objects and Direct Binding

The row object cotype is defined as follows. For more information about cotypes, see Conceptual Programming Models in 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;
}

Remarks

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.

This section contains the following topics: