User Messages Wizard (Sybase ASE)
Go Up to Sybase ASE Object Wizards
A user message let’s you write the error message users will see when a user-defined event transpires. The User Message Wizard lets you multiple language versions of a user message, specifying the message numbers, specifying the text for each language version, and binding the message to one or more integrity constraints.
To create a new user message using a wizard:
- Open a creation wizard for a user message. For details, see Opening an Object Wizard.
- Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
- Properties panel - for details, see User Messages (Sybase ASE) - Properties.
- Information panel - for details, see User Messages (Sybase ASE) - Information.
- Bindings panel - for details, see User Messages (Sybase ASE) - Bindings.
- DDL View panel - for details, see Previewing the DDL Generated to Create the New Object.
- Finally, use the Execute button to create the object.
User Messages (Sybase ASE) - Properties
When creating or editing a user message, this tab/panel lets you provide the message number parameter for the sp_addmessage system procedure calls that will create each language-based version of this user message.
To specify the message number for this user message
In the Message Number box, type a unique message number (20000 or greater).
User Messages (Sybase ASE) - Information
For each language in which the user message is to be available, the User Message Wizard/Editor builds a sp_addmessage system procedure call. This tab/panel manages the language and message text parameters for each sp_addmessage call.
To add a language version of the user message
- Click the Add new text for the user message button. The Create User Message Text dialog opens.
- From the Language dropdown, select the language for the message.
- In the Message Text box, type the text of the message.
- Click OK.
To edit an existing language version of the message
- Select the version from the Language/Message list.
- Click the Modify user message text button. The Edit User Message Text dialog opens.
- In the Message Text box, replace the text of the message.
- Click OK.
To delete an existing language version of the message
- Select the version from the Language/Message list.
- Click the Remove user message text button and verify when prompted.
User Messages (Sybase ASE) - Bindings
When creating or editing a user message, this tab/panel manages one or more sp_bindmsg system procedure calls that will be issued with the sp_addmessage calls that create or edit a user message. This lets you bind the user message to, or unbind the user message from foreign keys or check constraints.
To bind a user message to an integrity constraint
- From the Constraint Type dropdown, select the type of integrity constraint (Check Constraints or Foreign Keys) to which you are binding the user message.
- Select one or more check constraints or foreign keys from the list on the left and click Bind.
To unbind a user message from a currently bound integrity constraint
- Select one or more check constraints or foreign keys from the list on the right and click Unbind.