File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Scrollable pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Scrollable pages" Watch "Scrollable pages" New topic
Author

Scrollable pages

Per Lovdinger
Ranch Hand

Joined: Jun 11, 2001
Posts: 35
Scrollable pages
================
I have a jsp search page that I want to implement as scrollable.
There is a a search criteria on top and then there can be 20 lines of
found lines.
At the bottom there is a forward and a Next button ,in order to get next 20.
At the botton there is a text something like:
Lines 1 to 20 of 2000
My application Server is located in host_A and my dataBase is in host_B.
Assume that I want to read the database and populate the screen for first page.
That means I'm only interested in the first 20 rows and the total number of rows in the
resultset.

Problem 1:
Since I'm only want the first 20 rows I don't want to move 2000 rows over the
net (performance), how can I prevent that ?
Is there any possibility in the sql ?
problem 2:
How can I find out the the total number of rows in the resultset without
reading through it ? There is no method in ResultSet...
I've tried the last() method but that seems equalily as slow.
regards
Per Lovdinger

Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
1. setFetchSize
Dan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollable pages
 
Similar Threads
oracle thin driver scrollable resultset.absolute(1) is not returing the first row
correct design of table GUI + large resultset
Solving for Page With Slow Response Time
getFetchSize()
EJB-QL 2.0 & aggregate COUNT() functionality