Yes, We have been able to do it on the project I work. We are using
Oracle 8
JRUN 2.3
JSDK 2.1
Solaris 2.6
oracle.jdbc.driver.OracleDriver
In the first iteration of the project, displaying query results did not use
any "paging" concept. If the user made a query that returned 1000 rows,
that's what was displayed.
Like you, we had a problem when retrieving and displaying a large amount of
data. The problem for our project was in the way we were building the
display for the user. We created part of the HTML page by doing a bunch of
string concatenations:
String s;
while (notDone) {
s = s + nextRow;
}
And then when the entire page was built, writing to the output stream. Our
problem was an out of memory error while doing the string concatenations.
To fix the problem, we changed the code to use StringBuffers which were
pre-allocated to the proper size, and limiting the amount of rows to 650.
It's hard to say, but that could be one of the problems inside your while
loop.
Kevin Mukhar
> ----------
> From: Rajesh, Winston (CDI at
> Alcoa)[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology.
> Sent: Thursday, May 20, 1999 11:19 AM
> To: [EMAIL PROTECTED]
> Subject: Displaying more than 250 rows....
>
> Hi Folks,
> I would like to know if anybody was successful in retrieving more
> than
> 250 rows from an Oracle database and send them all to the browser and
> display it.
> I was able to only retrieve a maximum of 200 rows from my
> ResultSet
> object and after that my whole system comes to a grinding halt. I know
> it's pretty weird to display 250 rows of data to the user, but, I'm just
> curious to know, where is the problem exactly. Is it because of the
> Oracle Thin Driver's I use or is it JRun 2.3 cannot handle that large
> ResultSet's and time out(or crashes).
> To make it simple ,I just retrieved a large ResultSet from the
> database
> in my Servlet and simply went through the "while" loop to just pump out
> the rows to the browser. But, it couldn't go beyond a certain limit(250
> rows in my case). Is there any obvious things I need to take care while
> handling large Datasets.
> Any suggestions would be welcome. I'm also wondering whether using
> an
> Applet instead of the HTML for displaying, would help solve my problem.
> Thanks for any help offered,
> >
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html