This probably isn't the proper forum for this, but I'll answer
anyways.

        You could just put the ResultSet into your session.  This is
probably a bad idea since you would be keeping database connections open for
long periods of time.

        You could keep an index you're at as part of the session/parameter,
then on every time you return to the page you would perform the query again,
skip the appropriate number of rows and continue.  (Depending upon your
database server you might be able to indicate to it not to return the extra
rows).  The problem with this is that you are querying the database every
time and probably going to be bringing back extra data.

        You could suck in all of the resultset into some data holding object
(List of basically C-style structs) and store this in the session.  Then use
a current page variable to select the correct rows.  This would probably
waste lots of memory but would limit the number of database accesses.

        Another way would be to suck in all the records on the first access
and include them in the web page by JavaScript.  The JavaScript would then
control the page display.  This would be ultra-fast and would eliminate
server access, but it would take longer to download each page.

        There are several other alternatives available by mixing several of
these methods.  It seems to me that typical access will be to look at the
first several pages more frequently, so you might pull in those records into
memory and only have to go back to the database when they request something
like page 5 or 6.  (Fetch X pages of records at a time).  This hybrid would
also work well with the last solution - send the user 4 pages of results and
then to move to the next age you need to access the server.

        Just some quick thoughts.

        Randy

-----Original Message-----
From: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 12:54 AM
To: [EMAIL PROTECTED]
Subject: search display problem


hello everybody,
i have a problem. i am making a search page in which all the records are
being displayed from the database. Now what my problem is that i want to
make it look like Google site. in which every page has 10records and when i
click on the link then i get to see the records with 10 pages. if anybody of
you has gone through this then plz tell me how to do it. any idea is welcome
bye
vikram


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to