I have a 2 ResultSet's generated from the same Statement object.
Code Sample follows:
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
con = DBAccess.getConnection();
stmt = con.createStatement();
rs = stmt.executeQuery(Query1);
// operate on the resultset
rs = stmt.executeQuery(Query2); // Is it legal and do not have side-effects?
// operate on the resultset
// close everythings (Resultset, Statement, Connection)
I checked it to work well. My doubt is will it have any side effects ?