× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Loading large resultset to a List
  • From: "Alex Garrison" <agarrison@xxxxxxxxxxx>
  • Date: Wed, 31 May 2000 12:07:39 -0400

John,

On our system we are using servlets and jsp's to present html to a client
browser.  In order to display large lists, we do the following:
1. build a page of data in a servlet.  Put the info in a bean and pass to a
jsp.
2. jsp displays the page to the client browser.  The displayed page has
buttons for page up/down and a place to put in a search field (you dont want
to page down through 100,000 employees if you really want to see Mr. Zero).
3. Client browser clicks on page down/up or enters search info.  Info is
sent to the servlet.  Go to step one above.

This technique works quite well for us.  The servlet doesnt have to just
retrieve one page worth of data, by the way.  You can let the servlet
retrieve whatever makes sense and hold onto the result set and wait on the
page up/down/search from the client.

This is basically the same technique we have used for years in building
subfiles.  Since your subfile in the rpg world can only have 9999 entries,
you have to handle the page up/down yourself when going through large lists.

Alex Garrison

----- Original Message -----
From: "Lee, John" <JLee@lear.com>
To: <JAVA400-L@midrange.com>
Sent: Wednesday, May 31, 2000 10:46 AM
Subject: Loading large resultset to a List


> Using JDBC, I want to retrieve rows from an employee master file located
on
> a server. These rows I will then load into a List. This List will then be
> displayed to the user, where they will position/scroll to the desired
> employee.
> When the number of employees in the database is relatively small, this is
> easy. I can retrieve all the rows with one request and then load the List.
> However, if the number of employees in the database is very large (say,
> 100,000), then I have a problem. Even if I could, I wouldn't want to
attempt
> to retrieve all 100,000 rows and then load them all into the List. Yet, as
> the user is repositioning/scrolling through the List, I want it to appear
to
> them that it does contain all 100,000 rows.
> Is there a commonly accepted way of retrieving/presenting a large table in
> this manner? It almost seems that I should be retrieving some new subset
of
> rows each time the user uses the scroll bar or repositions the list (using
a
> text field).
>
> I'm not necessarily looking for example code. A few words outlining how
one
> might accomplish this, or suggested links of where I might find the
> information, would go along way.
>
> Thank you.
>
>
>
>
> +---
> | This is the JAVA/400 Mailing List!
> | To submit a new message, send your mail to JAVA400-L@midrange.com.
> | To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
JAVA400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner: joe@zappie.net
> +---
>

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.