How To Retrieve Values in SQL Server Stored Procedures with ADO (194792)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q194792
For a Microsoft Visual Basic .NET version of this article, see 308049.
SUMMARY
There are important issues to consider when attempting to retrieve
RAISERROR/PRINT/RETURN values from SQL Server stored procedures through
ActiveX Data Objects (ADO). Here are three issues:
- RAISERROR statements in SQL Server must be a severity level of 11-18.
- PRINT statements in SQL Server can also populate the ADO errors
collection. However, PRINT statements are severity level zero (0) so, at
least one RAISERROR statement is required in the stored procedure to
retrieve a PRINT statement with ADO through the Errors collection.
- RETURN values in a stored procedure must be associated with at least one
resultset.
REFERENCES
Transact-SQL Help: search on: "PRINT/RAISERROR statement"
For more information, please see the following article in the Microsoft
Knowledge Base:
190988 How To Open ADO Recordsets Asynchronously Using WithEvents
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbDatabase kbhowto kbprint kbStoredProc KB194792 |
---|
|