Delen via


FILESTREAM Support (OLE DB)

Beginning with SQL Server 2008 and SQL Server Native Client 10.0, OLE DB supports the enhanced FILESTREAM feature. For more information about this feature, see FILESTREAM Support.

To send and receive varbinary(max) values greater than 2 GB, an application uses DBTYPE_IUNKNOWN in parameter and result bindings. For parameters the provider must call IUnknown::QueryInterface for ISequentialStream and for results that return ISequentialStream

For OLE DB, checking related to ISequentialStream values will be relaxed. When wType is DBTYPE_IUNKNOWN in the DBBINDING struct, length checking can be disabled either by omitting DBPART_LENGTH from dwPart or by setting the length of the data (at offset obLength in the data buffer) to ~0. In this case, the provider will not check the length of the value and will request and return all of the data available through the stream. This change will be applied to all large object (LOB) types and XML, but only when connected to SQL Server 2005 (or later) servers. This will provide greater flexibility for developers, while maintaining consistency and backwards compatibility for existing applications and downlevel servers.

This change affects all interfaces that transfer data, principally IRowset::GetData, ICommand::Execute, and IRowsetFastLoad::InsertRow.