User Messages Wizard (Sybase ASE)

From DBArtisan
Jump to: navigation, search

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:

  1. Open a creation wizard for a user message. For details, see Opening an Object Wizard.
  2. Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
  3. 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

  1. Click the Add new text for the user message button. The Create User Message Text dialog opens.
  2. From the Language dropdown, select the language for the message.
  3. In the Message Text box, type the text of the message.
  4. Click OK.

To edit an existing language version of the message

  1. Select the version from the Language/Message list.
  2. Click the Modify user message text button. The Edit User Message Text dialog opens.
  3. In the Message Text box, replace the text of the message.
  4. Click OK.

To delete an existing language version of the message

  1. Select the version from the Language/Message list.
  2. 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

  1. From the Constraint Type dropdown, select the type of integrity constraint (Check Constraints or Foreign Keys) to which you are binding the user message.
  2. 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

  1. Select one or more check constraints or foreign keys from the list on the right and click Unbind.