Product Documentation

FairCom Java & .NET Stored Procedures

Previous Topic

Next Topic

SqlTrigger

SqlTrigger is the class that implements a Trigger. To create a Trigger, a new class derived from the SqlTrigger class must be created. This class must implement the Execute() method, which is the method called by the server. The Visual Studio Extension automatically performs the following:

  • It generates the class.
  • It generates the Execute() method and adds proper code to exchange the Trigger old and new rows (when referenced) and return code.
  • It creates an ExecuteSP method for you complete the implementation.

SqlTrigger Class Description

This class inherits from SqlSpBase. It adds the following additional methods.

Constructor

SqlTrigger()

Public

SqlSpRow GetNewRow()

The method above returns an SqlSpRow object containing “newrow” columns’ values. See the SqlSpRow description to learn how to access the columns’ definitions and values.


SqlSpRow GetOldRow()

The method above returns a SqlSpRow object containing “oldrow” columns’ values. See the SqlSpRow description to learn how to access the columns’ definitions and values.

TOCIndex