File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases and the fly likes Callable Statement with OUT parameter issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Callable Statement with OUT parameter issue" Watch "Callable Statement with OUT parameter issue" New topic
Author

Callable Statement with OUT parameter issue

Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

hi

i have stored proc in DB2 which has 1 IN and 1 OUT parameter , also returns result set .

In java how can i access the same ( result set wont be returned ,incase validation fails ,in case of validation it returns the code in OUT param )

Thanks


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 193

The out parameter would be a ResultSet.

Check if the Resultset updated with records after executing the CallableStatement.

If ResultSet is null throw an exception with validation error.


SCJP 5, SCWCD 5
 
 
subject: Callable Statement with OUT parameter issue
 
It's not a secret anymore!