共用方式為


Accessing BLOB Data

BLOBs can be accessed as in-memory data?a sequence of bytes sent or retrieved as a single unit?or as storage objects, through ISequentialStream, IStream, IStorage, or ILockBytes.

The provider can set the DBCOLUMNFLAGS_ISLONG flag to inform the consumer that the provider supports treating BLOBs as storage objects. Although the consumer can still choose to access the BLOB as in-memory data, there might be provider-specific problems in doing so. For example, the BLOB might be truncated due to machine limits on memory. Also, limitations on BLOB columns might apply to binding BLOBs as in-memory data. For example, IRowset::GetData might fail if called more than once for the BLOB. For more information on possible limitations when accessing BLOB columns, see Limitations of Storage Objects.

If the DBCOLUMNFLAGS_ISLONG flag is not set, the consumer can access the BLOB as in-memory data. It is provider-specific whether the provider supports reading such data through a storage interface. Most consumers allocate sufficient memory to hold such columns in their entirety and treat them as in-memory data.

This topic is a part of: