This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Scrollabel Result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Scrollabel Result set" Watch "Scrollabel Result set" New topic
Author

Scrollabel Result set

palukuri nag
Greenhorn

Joined: Oct 31, 2002
Posts: 12
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

Joined: Jul 09, 2001
Posts: 1879

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

Joined: Oct 31, 2002
Posts: 12
Hai
Can u tell me any driver which supports scrolling for the callabel statement. I am using SQL Server2000.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollabel Result set