The question is as title.
When I use ResultSet in Java, I find if the connection and PreparedStatement are closed, I Can't read any records from ResultSet.
How to keep readding the ResultSet when the connection is colsed?
I think the "closest" standard class might be the DefaultTableModel (which is hardly close at all). See http://stackoverflow.com/questions/1340283/datatable-equivalent-in-java and similar.
– Feb 04 '13 at 08:04
But frankly, most of the time, I just transform the data in a result set into a list of Java objects, and then close the connection, and use this list of objects later on.
+1, for this _I just transform the data in a result set into a list of Java objects, and then close the connection_ :)
– Pradeep SimhaFeb 04 '13 at 08:09
The list should contain instances of objects of a class *you* define, containing the appropriate attributes, constructor, methods, etc. So it should be a `List`, and not a `List` (MyObject just being an example name. If you're querying for users, the name of the class should probably be `User`).
– JB NizetFeb 04 '13 at 09:30