MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 7: BLOBs and COM Objects
Some providers support the storage and retrieval of binary large objects (BLOBs) in rowsets. To the provider (and thus the rowset), 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 is provider-specific.
This chapter 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 Chapter 9, "Row and Stream Objects."
This chapter 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 chapter.
For more information on | Go to |
Accessing BLOB data | "Accessing BLOB Data" in this chapter |
In-memory data | "BLOBs as In-Memory Data" in this chapter |
Storage object | "BLOBs as Storage Objects" in this chapter |
Rowsets | Chapter 4, "Rowsets" |
Limitations and lifetimes of storage objects | "Limitations of Storage Objects" in this chapter
"Lifetime of Storage Objects" in this chapter |
IPersist* objects | "IPersist* Objects" in this chapter |
OLE DB defines handling of the following kinds of objects:
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.