wood burning stoves 2.0*
The moose likes Java in General and the fly likes registerOutParameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "registerOutParameter" Watch "registerOutParameter" New topic
Author

registerOutParameter

Sham Usha
Greenhorn

Joined: Jul 22, 2001
Posts: 11
Hi..
When Stored Procedure returns a value(VARCHAR or NUMBER) ,In the javabean we used as follows
CallableStatement callstmt= null;
int NoRec;
callstmt=conn.prepareCall("{call PKG_NAME.PROCEDURE_NAME(?,'" +VARIABEL+ "')}");
callstmt.registerOutParameter(1, java.sql.Types.INTEGER);
callstmt.execute();
NoRec=callstmt.getInt(1);
callstmt.close();
My prob. is I used Stored Procedure and its return an array type
then how I register it in the bean and what is getxxx method?
OR else if Stored Procedure returns multiple records how it get into javabean?
Thanks in advance
Usha
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: registerOutParameter