File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Scrollable resultsets & PreparedStatements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Scrollable resultsets & PreparedStatements" Watch "Scrollable resultsets & PreparedStatements" New topic
Author

Scrollable resultsets & PreparedStatements

Mallika Kumar
Ranch Hand

Joined: Feb 15, 2001
Posts: 61
Hi,
I want to display few rows per jsp page, the number of rows should be selected by the user. I'm executing the query in a stateless session bean. I have a Java bean wrapper around it, whose methods I call in my jsp page. Can I get selected number of rows in the resultset itself, ie, specify the number of rows I want from the query when creating the query itself ? Is this why Scrollable resultsets are used ? And do preparedstatements support scrollable resultsets ?
Any clarifications regarding this will be helpful.
Thanks.
prabhatis
Greenhorn

Joined: Apr 07, 2001
Posts: 18
one possible soln ..
u can give the bean a session scope and get only required no of rows each time.
ans have a counter variable in bean and reset it on each call.
hope it will solve it..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollable resultsets & PreparedStatements