File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Resultsets nested within resultsets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Resultsets nested within resultsets?" Watch "Resultsets nested within resultsets?" New topic

Resultsets nested within resultsets?

shaf maff
Ranch Hand

Joined: Sep 07, 2008
Posts: 180
Hi Guys,

Due to the nature of how my system works, one way to overcome many of the problems was to use a resultset within a resultset. At the time it seemed fine but now I have realised that the main resultset will only go through one record even if there are several records in the database. When I comment out the two nested resultsets the main rs goes through all the records fine. So I am in need of some help, do I need to fix afew things here and there or do I need to restructure the whole code (gulp) ?! Comments most welcome:

Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

Sounds like you have problem with your DB class or your method DB.exQuery() .

Since you have not posted the code of DB class only thing I can guess is you are sharing the statement/Resultset across multiple calls and you loosing reference of previous resultset.

Could you post the code of DB class.


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
I agree. Here's the link:
subject: Resultsets nested within resultsets?
jQuery in Action, 3rd edition