Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using multiple ResultSets concurrently

843859Apr 17 2009 — edited Apr 18 2009
I'm in a situation where I need to read from multiple tables, all for the same person id number. The problem is that there are two tables I need to read that could return multiple rows for one person id and I have to process all the rows that come back from my query in order to decide which row's data I want to use. I don't get the person id, however, except from another query. I do not want to lose my place in the first (outer) query while I use the person id from the current row in this first ResultSet to go do my second (inner, as it were) query. However, my understanding is that if you do multiple quereies on the same Connection, the first ResultSet is invalidated. If that is still true, how can I execute a second query while the results from the first query are kept valid? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 16 2009
Added on Apr 17 2009
1 comment
133 views