Board index » delphi » BDE doesn't let me create a trigger in database syntax

BDE doesn't let me create a trigger in database syntax

The following statement will not run because BDE thinks ':' is preceding a
parameter specifier:

CREATE OR REPLACE TRIGGER replica1.TRGR002FEC
  AFTER DELETE OR INSERT OR UPDATE OF
    CodFer, DatFer, DesFer ON replica1.R002FEC
  REFERENCING
    OLD AS OLD
    NEW AS NEW
  FOR EACH ROW
DECLARE
  CHAVE_ID VARCHAR2(100);
  OPR VARCHAR2(4);
  TR VARCHAR2(100);
  WTRANS VARCHAR2(100);
  WSERV VARCHAR2(10);
BEGIN
  IF UPDATING THEN
    OPR:='UPDA';
  END IF;
  IF DELETING THEN
    OPR:='DELE';
  END IF;
  IF INSERTING THEN
    OPR:='INSE';
  END IF;
  TR:=DBMS_TRANSACTION.LOCAL_TRANSACTION_ID(FALSE);
  CHAVE_ID:=
    NVL(:OLD.CodFer, :NEW.CodFer)||';'||
    NVL(To_Char(:OLD.DatFer,'DD/MM/YYYY'),
To_Char(:NEW.DatFer,'DD/MM/YYYY'));
  SELECT CODTRA,IDESVR INTO WTRANS,WSERV FROM R400LCK WHERE TIPREG = 1;
  IF (WSERV IS NULL) THEN
    WSERV:='SUP';
  END IF;
  INSERT INTO R400TRS VALUES (TR,'R002FEC',CHAVE_ID,'replica1',WSERV,OPR);
END;

 

Re:BDE doesn't let me create a trigger in database syntax


Is SQLQUERYMODE set to SERVER?
Quote
Fernando Colombo wrote in message <6qmqdt$q...@forums.borland.com>...
>The following statement will not run because BDE thinks ':' is preceding a
>parameter specifier:

>CREATE OR REPLACE TRIGGER replica1.TRGR002FEC
>  AFTER DELETE OR INSERT OR UPDATE OF
>    CodFer, DatFer, DesFer ON replica1.R002FEC
>  REFERENCING
>    OLD AS OLD
>    NEW AS NEW
>  FOR EACH ROW
>DECLARE
>  CHAVE_ID VARCHAR2(100);
>  OPR VARCHAR2(4);
>  TR VARCHAR2(100);
>  WTRANS VARCHAR2(100);
>  WSERV VARCHAR2(10);
>BEGIN
>  IF UPDATING THEN
>    OPR:='UPDA';
>  END IF;
>  IF DELETING THEN
>    OPR:='DELE';
>  END IF;
>  IF INSERTING THEN
>    OPR:='INSE';
>  END IF;
>  TR:=DBMS_TRANSACTION.LOCAL_TRANSACTION_ID(FALSE);
>  CHAVE_ID:=
>    NVL(:OLD.CodFer, :NEW.CodFer)||';'||
>    NVL(To_Char(:OLD.DatFer,'DD/MM/YYYY'),
>To_Char(:NEW.DatFer,'DD/MM/YYYY'));
>  SELECT CODTRA,IDESVR INTO WTRANS,WSERV FROM R400LCK WHERE TIPREG = 1;
>  IF (WSERV IS NULL) THEN
>    WSERV:='SUP';
>  END IF;
>  INSERT INTO R400TRS VALUES (TR,'R002FEC',CHAVE_ID,'replica1',WSERV,OPR);
>END;

Other Threads