Checking the transaction state with @@transtate  Checking the status from the last fetch

Chapter 14: Using Batches and Control-of-Flow Language

Checking the nesting level with @@nestlevel

@@nestlevel contains the nesting level of current execution with the user session, initially 0. Each time a stored procedure or trigger calls another stored procedure or trigger, the nesting level is incremented. The nesting level is also incremented by one when a cached statement is created. If the maximum of 16 is exceeded, the transaction aborts.





Copyright © 2005. Sybase Inc. All rights reserved. Checking the status from the last fetch

View this book as PDF