meta data for this page
  •  

ibec_RecompileTrigger

Recompiles triggers.

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.

Syntax

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

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