INF: Interpreting Return Status Values from Stored Procedures
ID: Q96237
|
The information in this article applies to:
-
Microsoft SQL Server for OS/2, version 4.2
Under SQL Server version 4.2, stored procedures can report a return status
that indicates whether they completed successfully or the reasons for
failure. SQL Server-defined return status values for failure range
from -1 to -99; users can define their own return status values
outside this range.
Under the 4.2 release, failure values -1 to -14 are currently in use, with
0 indicating a successful completion. These reserved return values actually
map to the 10--the severity level of the error causing the execution
failure in the stored procedure. For instance, a severity 16 error within
the stored procedure causes a status of -6 (10-16) to be returned.
Similarly, a severity 24 error would cause a return status of -14. When
executing remote procedure calls across SQL Servers, a -6 return status
will also be returned in the event that the remote procedure does not
exist.
Additional query words:
4.20 4.20a Transact-SQL
Keywords : kbprg SSrvTran_SQL
Version : 4.2
Platform : OS/2
Issue type :
Last Reviewed: March 16, 1999