Export (0) Print
Expand All

BLOBs and COM Objects (OLE DB)

Some providers support the storage and retrieval of binary large objects (BLOBs) in rowsets. To the provider, a BLOB is a sequence of uninterpreted bytes. The consumer is responsible for interpreting the contents of the BLOB. The provider is responsible only for providing the mechanism or mechanisms with which the consumer stores and retrieves BLOBs and COM objects. Whether a provider supports BLOBs and COM objects depends on the provider.

This section discusses ways to access BLOB data as in-memory data, storage objects, and columns. In-memory data is treated as a sequence of bytes sent or retrieved in one piece. A storage object—that is, a COM object that exposes a storage interface such as ISequentialStream, IStorage, or ILockBytes—can be retrieved or sent in pieces. The rows in the rowset act as containers for the storage objects. A specialized type of storage object exposed by the COM interface IStream, called an OLE DB stream object, is described in Row and Stream Objects.

This section also discusses limitations and lifetimes of storage objects. COM objects—for example, objects that support IPersist* interfaces—can also be stored in columns in a rowset. The manipulation, update semantics, and transaction considerations of IPersist* objects are explained in this section.

For more information on

Go to

Accessing BLOB data

Accessing BLOB Data

In-memory data

BLOBs as In-Memory Data

Storage object

BLOBs as Storage Objects

Rowsets

Rowsets

Limitations and lifetimes of storage objects

Limitations of Storage Objects

Lifetime of Storage Objects

IPersist* objects

IPersist* Objects

OLE DB defines handling of the following kinds of objects:

  • BLOB    An uninterpreted sequence of bytes or characters. There is no behavior encapsulated in a BLOB. All the logic for interpreting a BLOB is in the consumer. The type indicator of a BLOB column is DBTYPE_BYTES, DBTYPE_STR, or DBTYPE_WSTR.

  • IPersist* object    A COM object that exposes IPersistStream, IPersistStreamInit, or IPersistStorage. The type indicator of an IPersist* column is DBTYPE_IUNKNOWN.

The consumer can determine what types of BLOBs and COM objects a provider supports by calling IDBProperties::GetProperties, passing the DBPROP_OLEOBJECTS property as a parameter.

This section contains the following topics:

Show:
© 2014 Microsoft