This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
 
Similar Threads
how do i get this boolean
Stored Procedures
resultset and .first() query
Return more recods from stored procedure
executeUpdate() returning unexpected results