Chapter 3 DBMS Reference Guide


UseErrorMsgText

Handles errors during trigger generation using standard error messages.

When you select Standard in the Error Messages tab of the Rebuild Triggers dialog box, the .ERROR macro will be replaced by the content of the UseErrorMsgText entry during the rebuild process.

The .ERROR macro, is called by a template item in the trigger template, it has two parameters: %ERRNO% is the error number and %ERRMSG% is the text message.

With the Standard error messages option selected, if an error number in the trigger script corresponds to the %ERRNO% parameter of the .ERROR macro, the corresponding message of the macro is used.

Example

In Sybase Adaptive Server Enterprise 12:

begin
   select @errno  = %ERRNO%,
          @errmsg = '%ERRMSG%'
   goto error
end

In this case, the error number and the text message are directly used.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.