PRB: Single SQL Server Connection Can Support Only One Active Firehose Cursor (258697)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft SQL Server 7.0
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
This article was previously published under Q258697 SYMPTOMS
SQL Server can support only one active firehose (server-side, forward-only, read-only) recordset per connection. If you try to open a second firehose ADO recordset on an ADO connection before processing or looping through all the records of the original firehose recordset, ADO silently opens an additional database connection to SQL Server. This additional connection is opened to manage the second ADO firehose recordset.
CAUSE
A single SQL Server connection can only support one active command. While a firehose cursor is the fastest means to get a Recordset from the server, it does so by not creating a cursor. The effect of not creating a cursor forces the connection to be dedicated between the client and server until all the records have been fetched. Since a cursor was not established, there is no way to maintain the current record in the Recordset and, as a result, the connection is forced to service the request for the firehose cursor until the end of file (EOF) has been reached. You can change the behavior by specifying a cursor, but this incurs the overhead of maintaining a cursor, which is typically not all that great in comparison to the build fetch.
The information in this article applies to SQL Server, Sybase, and a few other database systems that support only one active command per connection. It does not apply to Jet or Oracle, because both of these support multiple active statements per connection.
NOTE: The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Modification Type: | Major | Last Reviewed: | 1/11/2001 |
---|
Keywords: | kbprb KB258697 |
---|
|