BLOBs can be accessed as in-memory data, that is, a sequence of bytes sent or retrieved in one piece; or as a storage object, that is, through ISequentialStream, IStream, IStorage, or ILockBytes. The method a consumer uses depends on the setting of the DBCOLUMNFLAGS_ISLONG flag returned by IColumnsInfo::GetColumnInfo and the length of the BLOB data.
The provider sets the DBCOLUMNFLAGS_ISLONG flag to inform the consumer that the provider supports data access through a storage interface as the preferred way to access the BLOB data. Although the consumer can still choose to access the BLOB as in-memory data, there may be provider-specific problems in doing so. For example, the BLOB might be truncated due to machine limits on memory or IRowset::GetData might fail if called more than once for the BLOB.
If the DBCOLUMNFLAGS_ISLONG flag is not set, the consumer can safely access the BLOB as in-memory data. It is provider specific whether the provider supports reading such data through a storage interface. In general, consumers allocate sufficient memory to hold such columns in their entirety and treat them as in-memory data.