Unable to create trigger in Oracle 11g via C++

Issue #8 resolved
Dhananjay Team created an issue

Hi, i am not able to create trigger with bow code:

Connection_beginTransaction(con); Connection_execute(con,"create or replace TRIGGER CONTAQUE_SCHEDULER_TRIGGER BEFORE INSERT ON CONTAQUE_SCHEDULER REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT NG_scheduler_ID_SEQ.nextval INTO :NEW.ID FROM dual; END;"); Connection_commit(con);

Can you check and revert please what is wrong!! Note: same command works fine on sqlplus console.

Regards, Dhananjay

Comments (4)

  1. Abhay Gupta

    The problem is due to StringBuffer_trim being used in OracleCoonection_execute function of OracleConnection.c . So ideally this function should wither not be called or should only be called if the query does not contain END;

    It is technically wrong to remove semicolon after END in trigger and this should be corrected in the source code .

  2. Log in to comment