Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Creating a trigger that calls a stored procedure

Creating a trigger that calls a stored procedure

From: Elie <higuey77_at_yahoo.com>
Date: 22 Dec 2002 19:31:50 -0800
Message-ID: <4cea796.0212221931.96143b8@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US