Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Scrollable resultsets & PreparedStatements  RSS feed

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!