• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CallableStatement - Scrollable ResultSet

 
Avneet Singh
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I wanted to knw how do we set a result set type = scrollable in callablestatements.

generally in statements or prepared statements we do

Statement stmt = oConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);

PreparedStatement stmt = oConn.prepareStatement(insert,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);

but where should we do this in a callablestatement.

CallableStatement stmt = oConn.prepareCall();

thanks.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
refer to javadocs for Connection, it has methods for same
  • connection.prepareCall(String sql, int resultSetType, int resultSetConcurrency)
  • connection.prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)



  • Hope this helps !

    Shailesh
    [ May 09, 2006: Message edited by: Shailesh Chandra ]
     
    Shailesh Chandra
    Ranch Hand
    Posts: 1082
    Java Oracle Spring
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Avneet,

    out of curosity just want to ask where are you going to use this. What is your database etc...

    As far as I know about Oracle,In Oracle ResultSet scrollability is not supported on resultsets returned from a stored procedure or function

    This fact is true upto Oracle 10g release 1, I am not sure about 10 g release 2.

    Read the documents of your DB vendor, if it has support for scrollable resultsets or not.

    Shailesh
     
    Avneet Singh
    Ranch Hand
    Posts: 51
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    thanks for ur help.

    Ya you are rt it doesnt support rs scrollability returned from a stored procedure at db end.

    By the way im using Oracle 8i
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic