I would like to write a java function that takes an SQL query and returns a ResultSet for processing elsewhere. This cannot be done because the ResultSet is dead after the connection is closed.
Google google found a VERY OLD (2004) OReilly article that had something similar to a cure: CachedRowSet. You just drop your ResultSet, CachedRowSet saves the data, allows you to close the connection and play with the data elsewhere using the returned CachedRowSet.
This article mentions CachedRowSet by Sun implementations that seem to be not found anywhere.
Modern javadocs (for Java 1.5 and later) seem to have the same name "CachedRowSet", which is more than just the owner of the ResultSet data. That "CachedRowSet" seems to handle all database processing from receiving connections and everything else.
Is THAT "CachedRowSet" the same as the old article says?
I would like something simple, as in an old article. Something to flip the ResultSet to handle after closing the connection.
Is there such an animal?
thanks
Steve source share