hey folks, the code: ----------- ResultSet r1=statement.executeQuery(select * a); ResultSet r2=statement.executeQuery(select * b); ----------- for some reason r1 is ok, but r2 is empty. if i make a totally new statement for the second ResultSet, like this: ----------- ResultSet r1=statement1.executeQuery(select * a); ResultSet r2=statement2.executeQuery(select * b); ----------- everything works fine. i just don't want to open another connection to make a second statement, and i have examples where the first solution works fine. any ideas what is the problem? thnx
Asher Tarnopolski
SCJP,SCWCD
Pat Wallwork
Ranch Hand
Joined: Sep 23, 2001
Posts: 72
posted
0
From the api:
A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.
So in your case you should have 2 separate statement objects. -Pat