• 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

Scrollable ResultSet

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the JDBC API 2.0 (javax.sql) How can be obtain a scrollable ResultSet corresponding to a PreparedStatement object? I
Following is a code snippet which obtains a scrollable ResultSet from a Statement object:
Statement myStatement =
conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
I have JDK1.4. But when I try to print the API using javap javax.sql.Connection I don’t get the output. What do we need to install for JDBC2.0?
Regards,
Kunal Jaggi
SCJP2
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jaggi Kunal:
I have JDK1.4. But when I try to print the API using javap javax.sql.Connection I don’t get the output. What do we need to install for JDBC2.0?


!!!
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First off, the JDBC 2.0 is outlined by the java.sql specification ( not javax.sql ) so no further downloads are needed as it is included in the sdk 1.2 and up. But, most classes ( including Connection, ResultSet, Statement and most other classes ) are only an interface. So you have to find a jdbc driver to access your database that is jdbc 2.0 certified to be sure that these methods are implemented and ensure full functionality.
If you let us know which database you are using, maybe we can suggest some drivers that have worked for us.
just a note,
scrollable resultsets are highly over rated. They consume memory resources ( as the results are just cached to memory ) as well as tying up valuable database resources. You are better off saving your query results to a collection and using the Collection of data like you would the scrollable resultset.
Jamie
 
Jaggi Kunal
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using MS SQL Server 2000 on Windows 2000 Pro.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic