Solved

Scrollable ResultSet using Stored Procedure

Posted on 2001-08-28
4
285 Views
Last Modified: 2008-02-01
We are trying to get a Scrollable ResultSet from a Stored Procedure, but the ResultSet we get
 is TYPE_FORWARD, no matter what I set.
 I have used following Code to get it:
 
 cS = conn.prepareCall("{ call IWS_KLB.Pkg_TestSelect.TestSelect4 (?) }",
                           ResultSet.TYPE_SCROLL_SENSITIVE,
                           ResultSet.CONCUR_UPDATABLE );
 
 cS.registerOutParameter( 1, OracleTypes.CURSOR);
 cS.execute();
 ResultSet rset = (( OracleCallableStatement)cS).getCursor(1);
 
The Environment I'm working in is:
Oracle 8.1.7.2.0 for Solaris 8
JDK 1.3 under Windows2000
JDBC Driver Version 9.0.1 Thin


When I use a select statement instead of "{ call IWS_KLB.Pkg_TestSelect.TestSelect4 (?) }" it works just fine.

Is there a problem about casting a cursor into a Scrollable ResultSet?
Any ideas?

T.I.A.
0
Comment
Question by:kbrungs
4 Comments
 
LVL 3

Expert Comment

by:daitt
Comment Utility
Did you try (TYPE_SCROLL_INSENSITIVE, CONCUR_READ_ONLY) ?
I think you cannot use sensitive scrollable resultset when it created by a StoredProc because to check whether the change can affect the resultset or not, the server must run the StoredProc again.
Just my guess,
daitt
0
 

Author Comment

by:kbrungs
Comment Utility
Yes, I tried all supported combinations. It doesn't matter what I define the statement to be, after casting the cursor to an ResultSet it is TYPE_FORWARD_ONLY.
Thanks nevertheless,
Klaus
0
 
LVL 5

Expert Comment

by:vemul
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now