Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scrollabel Result set

 
palukuri nag
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
I am using JDK1.4. and I am using a statement like below.
-----------------
Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = st.executeQuery("select * from event_cal");
-------------------
and getting Result set. Using this result set I am able to move cursor forward and back words

But when i am using callable statement and getting result set by calling a Stored Procedure like below
--------------------
CallableStatement cs = con.prepareCall("{call retriveEvents(?,?)}",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
cs.setInt(1,2);
cs.setString(2,"N");
ResultSet rs = cs.executeQuery();
--------------------
I am unable to scroll forward and back words. It is showing error that result set type is TYPE_FARWORD_ONLY
Why i am not getting.
Thanks in advance
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you'll have to read your jdbc drivers documentation for limitations, but it sounds like it does not support scrollable ResultSets for CallableStatements, so it is just ignoring your request to make it scrollable. Sounds like you have to live with this limitation or find a JDBC driver that supports this feature.
Jamie
 
palukuri nag
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
Can u tell me any driver which supports scrolling for the callabel statement. I am using SQL Server2000.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic