PRB: Stored Procedures with a Return Statement Can Cause Errors (182929)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q182929 SYMPTOMS
Calling more than one OpenResultSet statement synchronously on the same
connection can generate the error:
Run-time error '40002':
S1000 [Microsoft][ODBC SQL Server Driver] Connection is busy with
results for another hstmt.
RESOLUTION
There are four possible workarounds for this issue:
- use rduseClientBatch and check the ResultSet's RowCount property prior
to executing the next OpenResultSet statement.
- remove the RETURN(0) statement from the Stored Procedure.
- set NOCOUNT to ON as the first line of the Stored Procedure.
- trap the error(s) and drop and re-establish the connection prior to
issuing any more OpenResultSet statements.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 4/18/2003 |
---|
Keywords: | kberrmsg kbprb KB182929 |
---|
|