MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 9: Row and Stream Objects
The columns in a row can be of any OLE DB data type, including instances of other COM objects (whose data type is DBTYPE_IUnknown), such as row, stream, and rowset objects.
Row object column values can be retrieved using the IRow interface, which all providers are required to support on row objects, and they can be updated using the optional IRowChange interface.
To retrieve the values of one or more columns from a row object, the consumer calls IRow::GetColumns. This method does not require an accessor object. Instead, the consumer passes an array of DBCOLUMNACCESS structures. Similarly, status information is returned in the output argument of this method rather than via an accessor. For more information, see the reference entry for IRow::GetColumns.
To open an object-valued column, such as the default stream for a row object, the consumer calls IRow::Open, which opens the COM object contained in the column and returns an interface pointer on it. For more information about object-valued columns, see Chapter 7, "BLOBs and COM Objects."
To update the value of one or more columns of a row object, the consumer calls IRowChange::SetColumns. As with IRow::GetColumns, no accessor object is required. The consumer specifies the number of columns to update, information such as the name and type of the column, and a buffer to hold the update value in an array of DBCOLUMNACCESS structures passed as an argument to the method.
If two row objects are created from the same row handle in a source rowset, metadata (schema) and data changes made to one row object are not visible to the other row object. However, once the changes have been transmitted to the underlying data store and the source rowset is recreated or refreshed (for example, by calling IRowsetRefresh::RefreshVisibleData), these changes are visible to new row objects that are created from the row handle.
If two row objects are created from the same row in the underlying data store but do not share a common source rowset, metadata (schema) and data changes made to one row object are not visible to the other row object. However, they are visible to new row objects that are created from the underlying row.