Re: ODBC & Correlation Name (:new and :old)

From: <sybrandb_at_yahoo.com>
Date: 20 Aug 2003 05:34:12 -0700
Message-ID: <a1d154f4.0308200434.88aea34_at_posting.google.com>


"Chris Blair" <chris_w_blair_at_yahoo.com.uk.zz> wrote in message news:<bhvk6a$mpf$1_at_nobel2.pacific.net.sg>...
> Does anyone know how to use correlation names (:new and :old) through an
> ODBC connection?
> EG:
> CREATE TRIGGER Print_Cust_changes
> BEFORE INSERT ON CUST_tab
> FOR EACH ROW
> BEGIN
> dbms_output.put('Adding: ' || :new.custid);
> END;
>
> 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...

One should rather ask why anyone out of his right mind want to create triggers on the fly using ODBC.
Shudder!

Sybrand Bakker
Senior Oracle DBA Received on Wed Aug 20 2003 - 14:34:12 CEST

Original text of this message