you can make a view in database
*******************
as create or replace view ordertransdate as
select * from table1 order by trans_date desc
in your query add the following
select * from ordertransdate where rownum <101 order by trans_date desc
*******************
try this and let me know please
sandarbh
hope this helps
byeeee
>From: "S. Chen" <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: How to set resultSet size
>Date: Tue, 2 Jan 2001 12:32:20 -0600
>
>Happy New Year to All!
>
>Hi, I have a JDBC question.
>
>I have a database and I need to retrive the latest 100 transactions into my
>jsp page. I am planning to do it this way:
>
>String query = "select * from table1 order by trans_date desc";
>ResultSet rs = stmt.executeQuery(query);
>int count=0;
>while (rs.next()&& count <100) {
> String s = rs.getString("Name");
> float n = rs.getFloat("Price");
> ...
> count++;
>}
>
>The problem is soon enough there will be over 10,000 transactions in the
>database. If I do it this way, it will be not efficient. so I want to use
>the method setFetchSize(100). Since I am new to java and jsp, I don't know
>how and where to use this method. Could anybody help me? Thanks very much!
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.html
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets