Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple resultset - strange problem

843859Sep 8 2006 — edited Sep 13 2006
Hi,

I have a stored procedure that returns a single resultset correctly.

ResultSet rs = cstmt.executeQuery();
while(rs.next()).......

Now, I have to change this stored proc, to return multiple resultsets. To test if my code works, I did not change the stored proc(it still returns 1 resultset), but changed my code to -

boolean results = cstmt.execute();
System.out.print("do resultsets exist - "+results);
System.out.print("update count- "+cstmt.getUpdateCount());

For some strange reason, the boolean value is false! And the updatecount value is 1.

Can someone pls. explain this? I have the code for retrieving multiple resultsets, but it does not get executed because the initial 'results' value is false.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2006
Added on Sep 8 2006
3 comments
63 views