Does anyone know how to use correlation names (:new and :old) through anMy guess is that you're not escaping the colon (:). In ODBC :<foo>
ODBC connection?
EG:
CREATE TRIGGER Print_Cust_changes
BEFORE INSERT ON CUST_tab
FOR EACH ROW
BEGIN
dbms_output.put('Adding: ' || :new.custid);
END;
indicates the presence of a bind variable.
I have to second Sybrand's concern, though. Why do you want to create
triggers on the fly via ODBC?
Justin Cave
When I try to do that using ODBC, I get this error:
Server Msg: 24344, State: HY000, [Oracle][ODBC][Ora]
Trigger, procedure or function created with PL/SQL compilation error(s).
And if I try and Insert I get:
Server Msg: 4098, State: HY000, [Oracle][ODBC][Ora]
ORA-04098: trigger 'BCL.PRINT_CUST_CHANGES' is invalid and failed
re-validation
Of course the same code works perfectly in SQL*Plus...