| Author |
how to create trigger using java code
|
Rakhi K
Greenhorn
Joined: Jul 18, 2002
Posts: 2
|
|
How to create oracle trigger using java code? [ October 08, 2002: Message edited by: Rakhi K ]
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Hi, Triggers are implicitly executed by the database when an event occurs. The event for e.g. could be ON DELETE,INSERT, UPDATE of a table row or it could be ON STARTUP of database. If u want to execute perform the event and as a result the trigger for the corresponding even gets exceuted. U cannot call triggers explicitly.
|
Groovy
|
 |
Michael Matola
whippersnapper
Ranch Hand
Joined: Mar 25, 2001
Posts: 1721
|
|
Rakhi, Please adjust your displayed name to meet the JavaRanch Naming Policy. You can do so here.
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
To create use Statements
|
 |
John Carnell
Author
Ranch Hand
Joined: Sep 27, 2002
Posts: 71
|
|
Originally posted by Rakhi: How to create oracle trigger using java code? [ October 08, 2002: Message edited by: Rakhi K ]
Hi Rakhi, I think what you want to do is write a Java-based stored procedure. Then you will have to write a PL/SQL based Oracle trigger to call the Java-stored procedure you wrote. You can not write Java-based triggers directly. They always have to be written in PL/SQL. Two books from Wrox have examples of how to write Java-based stored procedures. These books are: Oracle 8i Application Programming Oracle 9i Java As a disclosure: I wrote some chapters for these books, so I do have some bias in promoting them. I hope that helps. Thanks, John
|
John Carnell<br />Principal Architect<br /> <br />Netchange, LLC<br />1161 HillCrest Heights<br />Green Bay, WI 54313<br /> <br />john.carnell@netchange.us<br /> <br /> <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/159059228X/ref=jranch-20" target="_blank" rel="nofollow">Pro Jakarta Struts, Second Edition</a>
|
 |
 |
|
|
subject: how to create trigger using java code
|
|
|