answer to your question straight from the Java API:
"By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists. " (http://java.sun.com/j2se/1.4.2/docs/api/index.html)

I would suggest that you either first collect all IDs used in the update to a list (ListArray for example) and then build a single sql statement: "...WHERE group_code IN (x, y, z ...)" or maybe embed the whole thing to a single SQL update, meaning the first query and then the updates: "...WHERE group_code IN ([insert here you first query])".

It seems to me that when the first result set is large, using many update calls is quite a bit overhead. Of course you might still want to keep updates as they are in you code and fix your problem simply by creating an own instance of Statement for the updates.

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…

Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…