Hi Neil,
I implemented like this when I was working on pagination.
In the search criteria page I used to ask the no of results to be seen in
one page. Say N. (Generally multiple of 10).
Ex: 10 20 30 All
Basing on this value I used to get the scrollable result sets.
If 100 rows are retrieved for that and the user opted for 10rows per page,
then I used to give like this in the search results page
<< First << Prev Page 1 of 10 >>Next >> Last
For next page or previous page I used to send the following information
query string to my servlet.
http://someURL/MyServlet?CURRENT_PAGE=1&NO_OF_PAGES=10&ROWS_PER_PAGE_REQUEST
ED=10
Hope this will help you.
If any other way is there please update me which may be helpful to me in my
future projects and thanks in advance for that
Kishore Veleti
----- Original Message -----
From: "Neil Poska" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 4:04 PM
Subject: how do I paginate search results?
> The project I am working on has some search pages that can return
> hundreds of results. I want the user to be able to view a subset of
> these results and page forward and backward. Just about every site on
> internet paginates search results, but no one I know has any idea how it
> is done. I assume most of the dirty work and cache-ing are controlled at
> the database, and manipulated via JDBC, but I can't find a best
> practice. I am architecting an EJB application, and our database is
> Oracle 8i.
>
> So the question is this: what is the best way of paginating these
> results? Are there standard SQL types or JDBC methods that best control
> this behavior, maximizing performance (such as not returning all the
> results to the application server at once, and not having to regenerate
> the query from scratch at each request)?
>
> --
> --------------
> neil poska, supersonic enemy of evil
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".