Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Creating a trigger that calls a stored procedure
Hi,
Using JAVA (JDBC), I'm trying to create a trigger that calls a stored procedure. However there seems to be something wrong with my syntax because when I go to the database and check the status of the trigger it's invalid and as a result I am unable to call it. The stored procedure that the trigger is trying to call is valid and exist in the db.
Stored Procedure Code (which I believe is correct)is listed below.
String proc= "CREATE OR REPLACE PROCEDURE stored_proc (parameter1 IN NUMBER, parameter2 IN NUMBER) AS LANGUAGE JAVA NAME 'myClass.method_one(java.lang.Integer, java.lang.Double)';";
Trigger Code is listed below
String trig= "CREATE OR REPLACE TRIGGER myTrigg
AFTER INSERT ON student_billings FOR EACH ROW BEGIN call stored_proc(:new.parameter1, :new.parameter2); END;";
Does anyone notice something wrong.
Thanks in Advance Received on Sun Dec 22 2002 - 21:31:50 CST