The information in this article applies to:
SUMMARYWith SQL Server version 4.2, stored procedures return an integer value called a return status. This value can indicate normal operation or an error during stored procedure execution. User-defined return status values can also be returned by use of the RETURN() Transact-SQL statement. This article discusses which value is returned to the caller when several conditions that could result in different return status values occur during execution of a stored procedure. MORE INFORMATION
A return value can be set to a non-zero value by one of three failure
conditions:
User-defined status values set by RETURN() are an exception to the above rule. The value specified in the RETURN() statement is always returned from the stored procedure when the procedure is exited due to the RETURN(). It is important to note that if an error occurs that prematurely terminates execution of the stored procedure (a deadlock for instance), subsequent RETURN() statements will not be executed and the status value with the highest absolute value will be returned. Additional query words: Transact-SQL DB-Library remote stored procedure
Keywords : kbprg SSrvProg SSrvTrans SSrvServer |
Last Reviewed: March 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |