ResultSet is interface, and hold the result after I query the database. Can I open another space to hold that result set using cloning? How can I do that? Thanks!
posted 15 years ago
Strinctly a class which implements ResultSet doesn't hold any data. Drivers are free to go back to the database for each "next()". This is why a ResultSet is usually neither serializable nor cloneable. What almost everyone does is read the results into some other data structure (a 2d array, a Vector of arrays, an ArrayList of Maps, whatever.) You can make that data structure serializable or cloneable if you wish.