Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger error
Peta Griffith wrote:
> Trigger Error
> using the oracle oledb provider and ado with visual basic
> when creating a trigger
>
> this 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 FOR EACH ROW BEGIN SELECT
> SYLOGIN.SEQ_ERRORLOG.nextval INTO : new.ID FROM dual; END;"
>
Hello Peta,
You cannot put a blank between the colon and the new.id. Try it like
this:
.. into :new.id from dual;
IIRC there is a much better way to set the new ID: begin :new.id := sylogin.seq_errorlog.nextval; end;
This way you don't need to do a select to get the sequence value.
Hope that helps,
Lothar
-- Lothar Armbrüster | la_at_oktagramm.de Hauptstr. 26 | la_at_heptagramm.de D-65346 Eltville | lothar.armbruester_at_t-online.deReceived on Wed Mar 07 2001 - 11:21:32 CST
![]() |
![]() |