CHAPTER 6 Using Procedures and Batches
257
Notes
•
The DECLARE statement in
InnerProc
declares a symbolic name for one
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
InnerProc
procedure.
The following statement executes the
OuterProc
procedure:
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
InnerProc
are executed:
InnerProc
immediately passes control back to the calling environment, which
in this case is the procedure
OuterProc
. No statements following the CALL
statement in
OuterProc
are executed. The error condition is returned to the
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(*)
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...