|
Yes you can. ^_^
Ive done it, Im using 3 Result Set in a for loop. I used them to save connection in the port for multiple batch processing. And it is also possible to return to the previous row or any Row you would like. You Just to set the following
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSIT IVE, ResultSet.CONCUR_READ_ONLY); <-- Scrollable but Read Only
Statement stmt2 = con.createStatement(ResultSet.TYPE_SCROLL_INSENSIT IVE, ResultSet.CONCUR_UPDATABLE); <-- Scrollable and editable but requires a single connection
then you can invoke the ff:
rs.beforefirst() or rs.first() to return to the start
rs.previous() to return one row back
rs.afterLast() or rs.last() to go the last part if you want to insert a new Row
rs.absolute(int X) <--to go to a specific Row
But I think i masijade's solution to save it to a arraylist is a better approach if you will only need to get data from the database ^_^
__________________
Mind only knows what lies near the heart, it alone sees the depth of the soul.
Last edited by Eku : 06-26-2008 at 04:19 AM.
|