Hi
I am new to programming JSP, but have handled this problem in ASP before.
With the initial query, fetch the first 20 records
select top20 id, fieldnames.....
from tablename
where whatever is true
When the user wants to see the next 20 records, the query can be
select top 20 id, fieldnames.....
from tablename
where whatever is true
and id not in (select top 20 id from tablename)
Scott
----- Original Message -----
From: "David Maurange" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 04, 2000 12:15 AM
Subject: JDBC/SQL question
> Hi,
> It's probably not the good list for this question but I'm sure some of
> you have some ideas on it :
>
> I use Oracle DB <-> EJB <-> JSP to manage a web application.
>
> I want to display a list of results of a query by 20 by page and click
> on next for load the 20 next.
>
> I don't want to query all the results of my Oracle DB and select the
> good records after in my EJB.
>
> I presume I have to use cursor to do that but is it ok with JDBC ?
>
> thanks in adv. for all sugestions and code if possible.
>
> David
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> 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
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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