trigger creation via JDBC
843859Aug 14 2005 — edited Oct 19 2005Hi 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