Using multiple ResultSets concurrently
843859Apr 17 2009 — edited Apr 18 2009I'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.