This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invoking a trigger

 
Loh Ying Hui
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell me how can i invoke a trigger in a Database from a servlet ? what kind of statement do i need to execute ?
thanks
 
Tina Coleman
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically triggers are set to be invoked when someone inserts, updates, or deletes a row in the database. I don't think that triggers can be executed directly. If you need to do some sort of direct execution, use a stored procedure. Or execute the appropriate SQL from your code.
 
Loh Ying Hui
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh i see. can you tell me what's the difference between createStatement and createPreparedStatement ?
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
createPreparedStatement --> no such method...which leads me to believe you may need to have a read through Sun's
JDBC tutorial for the basic's.
Jamie
 
Loh Ying Hui
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh! I didnt notice i wrote createPreparedStatement instead of preparedstatement. anywayz, thanx for the link!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic