Chapter 5 Building Triggers and Procedures
Generating a user-defined error message
You can choose to generate a user-defined error message from the trigger generation parameters box.
To generate a user-defined error message:
- Select Tools→Rebuild Objects→Rebuild Triggers.
The Rebuild Triggers dialog box appears.
- Click the Error Messages tab.
The Error Messages page appears.
- Select the User-defined radio button.
- Type the name of the table that contains the error message in the Message Table Name box.
- Type the name of the column that contains the error number in the Message Number box.
- Type the name of the column that contains the error message text in the Message Text column.
Below is an example of the details for a table called ERR_MSG.
- Click the General tab and select the mode and triggers to create.
- Click the Selection tab and select the tables for which you want to create triggers.
For more information on rebuilding triggers, see section Rebuilding Triggers.
- Click OK.
The trigger rebuilding process is shown in the Output window.
Select Database→Generate Database to open the Database Generation window.
- Select generation parameters as required.
- Click OK.
For information on selecting trigger generation parameters, see section Generating Triggers and Procedures.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|