• 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

Scrolable ResultSet

 
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a question about the java.sql.ResultSet interface. What is a TYPE_SCROLL_SENSITIVE ResultsSet? Can it scroll forward, backward, bidirectional?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a default ResulSet you can only go forward, but you can get a scrollable ResultSet for example with this declaration:
statement = connection.createStatement(resultSet.TYPE_SCROLL_SENSITIVE,resultSet.CONCUR_READ_ONLY);
Now you can go forward and/or backward with the methods of ResultSet.
 
Usambara Veilchen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a default ResulSet you can only go forward, but you can get a scrollable ResultSet for example with this declaration:
statement = connection.createStatement(resultSet.TYPE_SCROLL_SENSITIVE,resultSet.CONCUR_READ_ONLY);
Now you can go forward and/or backward with the methods of ResultSet.
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, wrox's Professional Java Server Programming J2EE says
TYPE_SCROLL_INSENSITIVE : supports scrolling both directions.
TYPE_SCROLL_SENSITIVE: This result set of this type is sensitive to updates made to the data after the result set has been populated. For instance, if your result set returns 10 rows, and if another application removes 2 of the rows, your result set will only have 8 rows.
Does that mean a TYPE_SCROLL_SNSITIVE result set is sensitive to changes made by another application even after the result set had been retrieved?
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Park....
this facility is available with JDBC 2.0 only...rite...
Please Let me know//////
Raj
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic