ibec_RecompileTrigger

Recompiles triggers.

Syntax

 function ibec_RecompileTrigger(Connection : variant; TriggerName : string) : string;

Description

This function recompiles (alters using current trigger source) a specified trigger and returns an empty string if no error occurs or an error message otherwise. Instead of a trigger name you can specify an empty string to recompile ALL database triggers.

Examples of usage

1. Recompile a single trigger using the current connection:

   execute ibeblock
   returns (ErrMessage varchar(1000))
   as
   begin
      db = ibec_GetDefaultConnection();
      ErrMessage = ibec_RecompileTrigger(db, 'MYTABLE_TRG_BI');
      if (ErrMessage <> '') then
        suspend;
   end

2. Recompile ALL database triggers using the current connection:

   execute ibeblock
   returns (ErrMessage varchar(10000))
   as
   begin
      ErrMessage = ibec_RecompileTrigger(0, '');
      if (ErrMessage <> '') then
        suspend;
   end

See also:
Recompile all Stored Procedures and Triggers

back to top of page
<< ibec_GetDefaultConnection | IBEBlock | ibec_RecompileProcedure >>