Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: TRIGGER ERROR 2

Re: TRIGGER ERROR 2

From: William Bailey <billbailey64_at_netzero.net>
Date: Thu, 08 Mar 2001 01:58:51 GMT
Message-ID: <vHBp6.3390$68.738487@typhoon.tampabay.rr.com>

I'm only guessing because I'm not terribly familiar with the OLEDB provider, but it seems likely that the sql text is being parsed and the :NEW is being misinterpreted as a bind placeholder (since placeholders also use the colon syntax) ... then when you don't bind any variables (which you can never do for DDL), it complains that you didn't provide any value for the :NEW placeholder. Seems reasonable to me, but I can't confirm ... this might be a bug, but its also possible you can get around it by escaping the colon.

Make sense?

"Peta Griffith" <peta_at_dataspeed.com.au> wrote in message news:fZyp6.10325$v5.43049_at_newsfeeds.bigpond.com...
> Trigger Error
> using the oracle oledb provider and ado with visual basic
> when creating a trigger
> these statement will return then error 'No value given for one or more
> required parameters'
>
>
> con.execute "CREATE OR REPLACE TRIGGER SYLOGIN.TRI_SEQ_ERRORLOG BEFORE
> INSERT ON SYLOGIN.ERRORLOG REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
> BEGIN :NEW.ID := SYLOGIN.SEQ_ERRORLOG.NEXTVAL; END;"
>
> con.execute "CREATE OR REPLACE TRIGGER SYLOGIN.TRI_SEQ_ERRORLOG BEFORE
> INSERT ON SYLOGIN.ERRORLOG FOR EACH ROW BEGIN :NEW.ID :=
> SYLOGIN.SEQ_ERRORLOG.NEXTVAL; END;"
>
> con.execute "CREATE OR REPLACE TRIGGER SYLOGIN.TRI_SEQ_ERRORLOG BEFORE
> INSERT ON SYLOGIN.ERRORLOG REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
> BEGIN SELECT SYLOGIN.SEQ_ERRORLOG.nextval INTO :new.ID FROM dual; END;"
>
>
>
>
Received on Wed Mar 07 2001 - 19:58:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US