Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

trigger creation via JDBC

843859Aug 14 2005 — edited Oct 19 2005
Hi everybody.
I need to create a trigger via JDBC on Oracle.
This trigger contain a call procedure.
The sql statement is:

CREATE OR REPLACE TRIGGER TRIG1T9 BEFORE
INSERT ON T9
CALL insert_log('T9')

When I execute this statement I receive this warning:

PLS-00103: Found symbol "end-of-file" instead of:
:= . ( % ;
Symbol ";" has been substituted ...

If I use a Pl/Sql Block there are no problems.

The code is:

String code="CREATE OR REPLACE TRIGGER TRIG1 BEFORE "+
"INSERT ON T9 "+
"CALL insert_log('T9')";
Statement stmt = null;
try
{
stmt = connection.createStatement();
stmt.execute(code);
stmt.close();
}
catch(SQLException e)
{
}

Why this error ?

Thanks
Antonio
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 16 2005
Added on Aug 14 2005
12 comments
174 views