views:

149

answers:

1

Hi,

I want to fire a trigger whenever an insert command is fired..

The trigger will access a pl/sql file which can change anytime..

So the query is, if we design the trigger, how can we make sure this dynamic thing happens.. As during the stored procedure, it is not workingg..

I think - it should work for

1) External Procedures 
2) Execute Statement

Please correct me, if I am wrong.. I was working on External Procedures but i am not able to find the way to execute the external procedure from here on..

SQL> CREATE OR REPLACE FUNCTION Plstojavafac_func (N NUMBER) RETURN NUMBER AS
  2  LANGUAGE JAVA
  3  NAME 'Factorial.J_calcFactorial(int) return int';
  4  /

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

SQL> CREATE OR REPLACE TRIGGER student_after_insert
  2  AFTER INSERT
  3  ON student
  4  FOR EACH ROW

How to call the procedure from heree... And does my interpretations are right,, plz suggest..

Thanks.

A: 

either use procedure for inserting where you will handle your data and then quit procedure (cancel insert) or make successful insert, or do your data handling in trigger not in procedure

Xorty