Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scrollable resultset for prepared statement

 
kavitha rama
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we define a scrollable resultSet for a prepared statement? If so how? Please help
 
Milind Mahajan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You can do that by using following method in Connection interface included in JDBC 2.0 API.
prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
set the value of second argument - 'resultSetType' as ResultSet.TYPE_SCROLL_SENSITIVE to get scrollable resultset.
-Milind
 
Sujatha Ranganathan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to this sample to know more about the Scrollable ResultSet functionality - http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc20/jdbc20.htm
 
kavitha rama
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic