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

Handling Cursors in JDBC programming

 
Rajaguru Ramalingam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Assume, my Stored procedure returns 10 values of same type.If i din't keep that as array, i can use the cursor otherwise. If it is the case, how to handle the cursor which has values of same type in my java-jdbc programming?

Thanks in advance.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Register your out paramter as cursor, execute the procedure then typecast your output cursor to resultset and use onwards

Shailesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic