This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to fetch some records at a time

 
krussi rong
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I dont know how to fetch some records at a time,
example, every time I only want to fetch 10
records. Does anyone know that?
thanks
Krussi
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are looking for ways to fetch 10 records, then fetch the next ten, etc... like some web pages, then have a look at this article which discusses this in detail. If you only want the first X number of rows, and that's it, have a look at the Statement.setMaxRows() method
Jamie
 
krussi rong
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply,
I really want to look for ways to fetch 10 records, then fetch the next ten, etc...
I read the JDBC 2.0 API, and not sure
Statement.setFetchSize(10);
Statement.setFetchDirection(forward);
can deal with my problem?
Does anyone use this and know what the exactly
above function's usage?
thanks
Krussi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic