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

Home -> Community -> Usenet -> c.d.o.server -> Re: Executing SQL Statements throught ADO

Re: Executing SQL Statements throught ADO

From: Mark Filson <mfilson29NOSPAM_at_hotmail.com>
Date: Fri, 05 Dec 2003 19:19:46 GMT
Message-ID: <mT4Ab.18539$bC.11838@clgrps13>

"tojo" <Tojo_at_hotmail.com> wrote in message news:MPG.1a3af072945d62b19896ca_at_news.t-online.de...
> In article <lpMzb.9514$d35.2257_at_edtnps84>, mfilson29NOSPAM_at_hotmail.com
> says...
> > Hi All,
> >
> > Here's the issue I'm having... I have a VB COM component that is used to
> > parse SQL files and apply them to an instance of Oracle. Most of the
> > statements in the sql file work but a few don't. Here is an example of
an
> > offending one:
> >
> >
> > CREATE OR REPLACE TRIGGER TR_SEQ_APPLICATION_SETTINGS
> > AFTER INSERT OR UPDATE ON APPLICATION_SETTINGS
> > FOR EACH ROW
> > BEGIN
> > SELECT SEQ_APPLICATION_SETTINGS.nextval INTO :new.ID FROM dual;
> > END TR_SEQ_APPLICATION_SETTINGS;
> > /
> >
> >
> > The Sequence that's referenced is created successfully and my code says
that
> > the trigger is created (ie, no errors are thrown), but when I attempt to
> > insert a bunch of values into the table APPLICATION_SETTINGS, errors are
> > generated. Is there something about the syntax of this create statement
> > thats wrong. For what it's worth, the above statement can be run in SQL
> > PLUS successfully and the trigger is created.
> >
> > Cheers.
> >
> >
> >
> If the provider is choking on :new, try adding the REFERENCES clause:
>
> CREATE OR REPLACE TRIGGER TR_SEQ_APPLICATION_SETTINGS
> AFTER INSERT OR UPDATE ON APPLICATION_SETTINGS
> REFERENCING NEW AS NEW OLD AS OLD
> <snip>
>
> -- Tom

Thanks for the tip. I've tried this and it still doesn't work. Received on Fri Dec 05 2003 - 13:19:46 CST

Original text of this message

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