In JDBC, if a statement is closed from which a result set was acquired, is the result set still valid?
Context: I have inherited a big java app. At a low level it has a method that creates a statement, does a query returning a result set, and returns the result set. The statement is left dangling (not closed, not referenced) and repeated calls to this are eating up all the memory in a big Informix server. A close on the statement was added to that method to get rid of the statement resource. One connection is used for hundreds of thousands of calls, so these resources accumulate on the connection.
Is it valid to close the statement and then use the result set, or is the result set dependent on the statement still being open?
The database is Informix.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.