[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

Scrollable ResultSet using Stored Procedure

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
kbrungs
Asked:
kbrungs
1 Solution
 
daittCommented:
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
 
kbrungsAuthor Commented:
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
 
vemulCommented:
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
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now