Hi All
I have developed a web site that opens a recordset at start, and while
looping through records of the main ResultSet i Open a new ResultSet for
each record, to get a specific information, then close it. like this:

while( rs.next() ) {
  Statement stmt = dbConn.createStatement();
  ResultSet newRs = stmt.executeQuery("SOME QUERY");
  ......
  .....
  *Some Code Here*
  .....
  .....

  stmt.close();
  newRs.close();
}

I feel that this way is resource-consuming, is it or not, and if it is, what
is the best way to code this code??

Thanks

Reply via email to