Contents Index COMPRESSION option [replication] CONVERSION_ERROR option [compatibility]

ASA Database Administration Guide
  Database Options
    Alphabetical list of options

CONTINUE_AFTER_RAISERROR option [compatibility]


Function 

Controls behavior following a RAISERROR statement.

Allowed values 

ON, OFF

Default 

OFF for databases created with Version 5.x.

ON for databases created with Version 6 or later.

See also 

ON_TSQL_ERROR option [compatibility]

Description 

The RAISERROR statement is used within procedures and triggers to generate an error. When this option is set to OFF, the execution of the procedure or trigger is stopped whenever the RAISERROR statement is encountered.

If you set the CONTINUE_AFTER_RAISERROR option to ON, the RAISERROR statement no longer signals an execution-ending error. Instead, the RAISERROR status code and message are stored and the most recent RAISERROR is returned when the procedure completes. If the procedure that caused the RAISERROR was called from another procedure, the RAISERROR is not returned until the outermost calling procedure terminates.

Intermediate RAISERROR statuses and codes are lost after the procedure terminates. If, at return time, an error occurs along with the RAISERROR, then the information for the new error is returned and the RAISERROR information is lost. The application can query intermediate RAISERROR statuses by examining the @@error global variable at different execution points.

The setting of the CONTINUE_AFTER_RAISERROR option is used to control behavior following a RAISERROR statement only if the ON_TSQL_ERROR option is set to CONDITIONAL (the default). If you set the ON_TSQL_ERROR option to STOP or CONTINUE, the ON_TSQL_ERROR setting takes precedence over the CONTINUE_AFTER_RAISERROR setting.


Contents Index COMPRESSION option [replication] CONVERSION_ERROR option [compatibility]