Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Scrollable ResultSets - JSP  RSS feed

 
Ath Kea
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use Scrollable ResultSets with Oracle 8.1.7 using JSPs. In particular, I am interested in giving the ability to the user to navigate through a big ResultSet by pressing next and previous buttons and showing the next or previous X rows of the ResultSet, respectively. I am new in the area and I am stuck. Your help would be more than welcomed. Thanks in advance!
 
Raveendran Karunakaran
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

First tell me are you trying to mean this, how to make your resultset or the results which you have got out of your operation to be put in a scrollable screen ? is this the question ?
 
Ath Kea
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose we have a resultset of 100 rows. It would be impractical to put all these rows in just one screen. One better solution would be to display only the first ten rows (for example) and then allow the users to move forward and backwards (ten rows each time) until they find the record they seek, or until the resultset is exhausted. The question is how to accomlish that.
 
Robert van der Vliet
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An easy solution would be use the HttpSession object and the getAttribute/setAttribute methods to store a reference to a Collection (Vector works nicely) of your results. Depending on your particular solution you may want to store only the unique identifiers for those results (the primary key, for example) rather than the full results themselves. Cheers, Rob
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!