File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes java event on sql insert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java event on sql insert" Watch "java event on sql insert" New topic
Author

java event on sql insert

Peter Straw
Ranch Hand

Joined: Jan 08, 2002
Posts: 79
Hello,
Is it possible to have some java code executed( such as sending mail) when a certain field in a database table is updated?
I am using ms-sql server 7. I know that there are triggers, but these seem to be confined to running sql statements not running java code.
Thanks in advance,
Peter
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I don't know about ms-sql server 7, but in Oracle you can call java programs from database triggers... but that doesn't really help you now does it!
The only alternative that I can quickly think of, is to check the condition in your java program before you insert/update through java. If the condition is right, execute the java, if not, just insert.
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java event on sql insert