Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying next 10 records from resultset

 
vikas dua
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Regards
Vikas
 
Bhushan Jawle
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bhushan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic