Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Trigger
On Tue, 3 Feb 2004 16:39:21 GMT, Rajesh Patel <rpatel_at_rajix.com> wrote:
>I had a sql file that just had Creates for
>tables/views. Then I tried to add a trigger.
>
>I was using a jdbc connection to send the sql
>file to the database. That worked great until
>I added the trigger. I kept getting errors from
>oracle.
Which errors? Post them, else any advice is just a guess.
>So I used to SQL Plus to run in the sql file,
>everything worked fine.
>
>So I have concluded that inorder to run in a trigger
>or any PL/SQL code I need to use SQL plus to
>send it to the database.
>
>Am I correct?
Probably not, but you'd have to be careful with triggers.
Presumably you have ':new' or ':old' in the trigger. This would get interpreted as a bind variable from most interfaces. You may be able to suppress this depending on your interface, or maybe not. I don't know whether you can in JDBC, haven't worked with it much.
But anyway - post the error message, as it may be something entirely different.
-- Andy Hassall <andy_at_andyh.co.uk> / Space: disk usage analysis tool <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>Received on Tue Feb 03 2004 - 13:58:53 CST