File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Displaying next 10 records from resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Displaying next 10 records from resultset" Watch "Displaying next 10 records from resultset" New topic

Displaying next 10 records from resultset

vikas dua

Joined: Dec 09, 2002
Posts: 1
Hi all
I am developing a website for some writers.
The website is database driven and contains writings and poetries
by different writers.
I am using servlet to connect to Database and using MySQL
as database.
I wanted to know that how can i display only some fields
from the recordset after search and then make the name of the
writer a hyperlink to next page which shows the details about
his/her work.
Also the data fetched into resultset should be displayed
on the page in such a way that only firt 10 records get displayed
in the first page and then i could navigate through rest
of the results using next and previous buttons.
Your help would be really appreciated..
Thank you in advance
Bhushan Jawle
Ranch Hand

Joined: Nov 22, 2001
Posts: 249
Yes it is possible.
To show details you can have a hyperlink to point to page which displays detail when appropriate parameter is passed to it like <a href="authorDetails.jsp?authorId=" <%=rs("authId")%> > rs("theFieldYouWantToBeDisplayedHere") </a>
'rs' here is a resultset object.
For paging, I don't know the best way of doing it, but have a feeling that it can be managed(need to check resultset documentation.)
Hope that helps.
wood burning stoves
subject: Displaying next 10 records from resultset
It's not a secret anymore!