Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Callable Statement with OUT parameter issue

 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 197
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic