Raiserror Statement [T-Sql] - Sybase Adaptive Server Anywhere Reference

Table of Contents

Advertisement

RAISERROR statement [T-SQL]

RAISERROR statement [T-SQL]
Function
Syntax
Permissions
Side effects
See also
Description
Parameters
584
Use this statement to signal an error and to send a message to the client.
RAISERROR error-number [ format-string ] [, arg-list ]
None.
None.
"CREATE TRIGGER statement" on page 480
"ON_TSQL_ERROR option" on page 201
"CONTINUE_AFTER_RAISERROR option" on page 179
The RAISERROR statement allows user-defined errors to be signaled and
sends a message on the client.
error-number
The error-number is a five-digit integer greater than 17000.
The error number is stored in the global variable @@error.
format-string
If format-string is not supplied or is empty, the error
number is used to locate an error message in the system tables. Adaptive
Server Enterprise obtains messages 17000-19999 from the SYSMESSAGES
table. In Adaptive Server Anywhere this table is an empty view, so errors in
this range should provide a format string. Messages for error numbers of
20000 or greater are obtained from the SYS.SYSUSERMESSAGES table.
In Adaptive Server Anywhere, the format-string length can be up to 255
bytes.
The extended values supported by the Adaptive Server Enterprise
RAISERROR statement are not supported in Adaptive Server Anywhere.
The format string can contain placeholders for the arguments in the optional
argument list. These placeholders are of the form %nn!, where nn is an
integer between 1 and 20.
You can use ON_TSQL_ERROR to control error handling within
procedures. This option indicates to the engine what action to take on an
error within a procedure error. If you set it to continue, behavior is similar to
Adaptive Server Enterprise.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents