File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Scrollabel Result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Scrollabel Result set" Watch "Scrollabel Result set" New topic

Scrollabel Result set

palukuri nag

Joined: Oct 31, 2002
Posts: 12
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);
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.
palukuri nag

Joined: Oct 31, 2002
Posts: 12
Can u tell me any driver which supports scrolling for the callabel statement. I am using SQL Server2000.
I agree. Here's the link:
subject: Scrollabel Result set
It's not a secret anymore!