Re: Creating Triggers From VB using ADO

From: (wrong string) án Garrido <agarrido_at_memory-set.es>
Date: Wed, 27 Feb 2002 16:40:42 +0100
Message-ID: <a5iumo$h3$1_at_talia.mad.ttd.net>


You have to add carriage returns to your statement:

Connection1.Execute "CREATE OR REPLACE TRIGGER MY_TRIGGER BEFORE INSERT ON MY_TABLE" &
vbCrLf & "FOR EACH ROW BEGIN SELECT MY_SEQUENCE.nextval INTO :new.FIELD" & "FROM dual;" &
vbCrLf & "END;"

Regards
Adrián Garrido

"Peta Griffith" <peta_at_dataspeed.com.au> escribió en el mensaje news:93_c8.9465$wG3.72547_at_newsfeeds.bigpond.com...
> i need to create triggers from a vb application but the ADO library will
not
> accept the syntax for the trigger
>
> this is the syntax that works in plsql or toad
>
> CREATE OR REPLACE TRIGGER SCHEMA.TRIGGERNAME BEFORE INSERT ON
SCHEMA.TBLNAME
> FOR EACH ROW BEGIN SELECT SCHEMA.SEQUENCENAME.nextval INTO :new.FIELDNAME
> FROM dual; END;
>
> the tables,foreign keys, indexes,sequences all pass through ok
> the only way i can get the ADO dll to accept this stament is to remove the
> colon and both semi colons this renders the trigger invalid
>
> Any help would be appreciated
>
> Paul Grimaldi
>
Received on Wed Feb 27 2002 - 16:40:42 CET

Original text of this message