IBM Database Add-Ins for Visual Studio  

IBM Database Triggers

A trigger defines a set of actions that are performed when a specified SQL operation (such as a delete, insert, or update operation) occurs on a specified table. When the specified SQL operation occurs, the trigger is activated and starts the defined actions.

Benefits of using triggers:

You can define triggers by using the CREATE TRIGGER statement.

The IBM Database Add-Ins for Visual Studio provide three approaches for creating a trigger in Visual Studio:

To develop an IBM database trigger in Visual Studio:

  1. Create a trigger by using one of the following tools:
    • IBM Table Designer
    • IBM View Designer
    • Visual Studio Code Editor
  2. If you used the editor to create the trigger from the Solution Explorer, build the trigger on a database server.
  3. Change the trigger information while you change the table definition or view definition, or edit the source code of the trigger, as appropriate.
  4. If you edited the source code of the trigger, rebuild the trigger on the database server, and run the trigger again.

See Also

Developing IBM Database Triggers | IBM Table Designer | Managing Procedures, Functions, and Objects


.NET Development Forum   DB2 FAQs   IDS FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.