• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Use ResultSet

 
boyet silverio
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to use or make a ResultSet object be used many times? I understand once a result set object has been used up i.e. up to rs.next()==false, it could no longer be used by another method to access its contents. To access such contents again, a new result set object need to be created. I have been using a Vector to store and reuse what I could get (thru...rs.next()...rs.getString(n)...) from a result set object but I think this is rather a time consuming extra step specially if one is dealing with so many columns...
There must be better ways ...somewhere, somehow. Thanks for any suggestions.
 
Aamir Iqbal
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ResultSet class have many methoed.
ur using only one of them rs.next(). there is rs.previous() and many more.
go and check ResultSet class in java
 
boyet silverio
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your comment Aamir. But kindly read through my previous post which is mainly about how to use a ("one") resultset object many or multiple times after it's been 'used up'(see previous post on a sample about what I mean by 'used up'). I've tried doing it in MS Access using the jdbc dbc driver but I did not find success. Just a while ago, had some success with Mysql though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic