Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 277

Table of Contents

Advertisement

Notes
The DECLARE statement in
of the predefined SQLSTATE values associated with error conditions
already known to the server. The DECLARE statement does not take any
other action.
The MESSAGE statement sends a message to the server window and the
dbconsol message window.
The SIGNAL statement generates an error condition from within the
procedure.
InnerProc
The following statement executes the
CALL OuterProc();
The message window of the server then displays the following:
Hello from OuterProc.
Hello from InnerProc.
No statements following the SIGNAL statement in
immediately passes control back to the calling environment, which
InnerProc
in this case is the procedure
statement in
are executed. The error condition is returned to the
OuterProc
calling environment to be handled there. For example, DBISQL handles the
error by displaying a message window describing the error.
The TRACEBACK function provides a list of the statements that were
executing when the error occurred. You can use the TRACEBACK function
from DBISQL by typing the following statement:
SELECT TRACEBACK(*)
CHAPTER 6
Using Procedures and Batches
declares a symbolic name for one
InnerProc
procedure:
OuterProc
InnerProc
. No statements following the CALL
OuterProc
are executed:
257

Advertisement

Table of Contents
loading

Table of Contents