aspose file tools*
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
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
 
Consider Paul's rocket mass heater.
 
subject: Callable Statement with OUT parameter issue