Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - Database Administration » Database configuration » Database options » Alphabetical list of database options

on_tsql_error option

Controls error-handling in stored procedures.

Allowed values
  • Stop

    Stop execution immediately upon finding an error.

  • Conditional

    If the procedure uses ON EXCEPTION RESUME, and the statement following the error handles the error, continue, otherwise exit.

  • Continue

    Continue execution, regardless of the following statement. If there are multiple errors, the first error encountered in the stored procedure is returned once the procedure completes.



A temporary setting for the current user is established by SAP Open Client and jConnect TDS connections ('Continue').

  PUBLIC role For current user For other users
Allowed to set permanently? Yes, with SET ANY PUBLIC OPTION Yes Yes, with SET ANY PUBLIC OPTION
Allowed to set temporarily? Yes, with SET ANY PUBLIC OPTION Yes (current connection only) No

This option controls error handling in stored procedures and Transact-SQL batches. This option has no effect within the TRY block of a BEGIN...END statement, and the error handling behavior defined within the TRY block.

Both the Conditional and Continue settings for on_tsql_error are used for Adaptive Server Enterprise compatibility, with Continue most closely simulating Adaptive Server Enterprise behavior. To have errors reported earlier, use the Conditional setting when creating new Transact-SQL stored procedures.

When this option is set to Stop or Continue, it supersedes the setting of the continue_after_raiserror option. However, when this option is set to Conditional (the default), behavior following a RAISERROR statement is determined by the setting of the continue_after_raiserror option.