This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java event on sql insert

 
Peter Straw
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic