Show TOC

Creating User-Defined Error MessagesLocate this document in the navigation structure

You can create a message table in your database to store user-defined error messages. When you select trigger generation parameters, you can choose to generate an error message from this table.

Procedure

  1. Create a table with columns to store the following information:

    Column to store...

    Description

    Error number

    Number of the error message that is referenced in the trigger script

    Message text

    Text of message

  2. Generate the table in your database.
  3. Select Start of the navigation path Database Next navigation step Execute SQL End of the navigation path.
  4. Select a data source, fill in connection parameters, and click Connect.

    An SQL query editor box is displayed.

  5. Enter an SQL statement to insert a message number and text in the appropriate columns. For example:
    insert into table values (error number,'error message')
    insert into ERR_MSG values (1004,'The value that you are trying to insert does not exist in the referenced table')
  6. Click Execute.

    A message box tells you that the command has been successfully executed.

  7. Click OK to return to the SQL query dialog.
  8. Click Close.