You create a message table which stores error message information.
-
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
|
-
Generate the table in your database.
-
Select .
A dialog box asks you to identify a data source and connection parameters.
-
Select a data source and fill in connection parameters.
-
Click Connect.
An SQL query editor box is displayed.
-
Type an SQL statement to insert a message number and text in the appropriate columns. You can use the following format 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')
-
Click Execute.
A message box tells you that the command has been successfully executed.
-
Click OK.
You return to the SQL query box.
-
Click Close.