BUG: Using ISequentialStream to Access Binary Data May Hang an OLE DB Consumer Application (240394)
The information in this article applies to:
- Microsoft OLE DB Provider for SQL Server 7.0
- Microsoft OLE DB Provider for SQL Server 7.01
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q240394 SYMPTOMS
An application that binds a Binary Large Object (BLOB)/binary field to ISequentialStream objects may hang if ISequentialStream is not completely read and another query is performed on the same connection. The CPU usage shown in Windows NT taskbar will be at 100 percent.
To access BLOB/binary data, an application can use ISequentialStream to efficiently load data from a SQL Server database. However, any access to the data is blocked by the SQL Server OLE DB Provider (SQLOLEDB) connection object until ISequentialStream is completely read. This is problematic for OLE DB consumer applications that may not always want to read all data from a BLOB field, or where you may be fetching an ISequentialStream pointer and then not using it before executing the other query on the same connection.
This problem only occurs when the server-side cursors are being used.
NOTE: Releasing the ISequentialStream pointer is not sufficient to resolve this problem.
CAUSE
The application stops responding (hangs) because of a bug in SQL Server OLE DB provider. The provider waits for the application to read all incoming stream data including the binary data before it can run any further queries on the same connection/session.
RESOLUTION
You can use one of the following three workarounds to resolve this problem:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
190958 SAMPLE: AOTBLOB Read/Writes BLOB Using OLE DB Consumer Template
Modification Type: | Major | Last Reviewed: | 12/5/2003 |
---|
Keywords: | kbbug kbConsumer kbDatabase kbDTL kbProvider KB240394 |
---|
|