Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Concept of a OUT parameter in a CallableStatement

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is an OUT paramenter? I see that it gets "registered" as callstmt.registerOutParameter(1,"java.sql.Types.XXX)

Could you make an easy understandable example? I thoroughly understand what a IN parameter is (like the preparedStatement).

Thanks in advance.

 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The OUT parameter can be modified by the statement being executed (usually, but not necessarily, this would be a stored procedure). It is the same as parameters passed by reference known from other languages (not from Java, of course). You'll usually read the value of the parameter after the statement was executed, using the getXxx methods of the CallableStatement.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic