Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cursormoving without jdbc2.0

 
Jesper Ottosson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to move the cursor in a resultset to the first row, but i don't have access to jdbc2.0 methods... any ideas?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can only traverse the ResultSet in one direction in Java 1.X.
If you wish to be able to return to the start, you need to go through the ResultSet and store each result in a container or array. Then you can navigate to whichever result you need.
 
No more fooling around. Read this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!