• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Fetchsize

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
How to get the recordcount(I mean fetched records from the database).I know that there is a method called getFetchSize() in ResultSet.But it's giving the fetchsize is 1.How can it be possible?
Regards.
Vijaya.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
vijaya,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The fetch size is *not* the total number of rows in the ResultSet, but the number of rows that get fetched at one time. It's for nothing more than performance optimization.
 
srivijaya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
ThanQ! U mean to say that we can set the fetchsize explicitly.By default it fetches 1.Can we set more that one.I heard that we can fetch one by one only.I tried by using setFetchSize(int rows).But it's giving exception.
One more doubt regarding resultset scrolling.By default recordset is TYPE_FORWARD_ONLY .If resultset is TYPE_SCROLL_INSENSITIVE then we can get the recordcount.I'm unable to set this cursor.Can any one clear this .
Regards.
Vijaya.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic