This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Multiple Result Sets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Multiple Result Sets" Watch "Multiple Result Sets" New topic

Multiple Result Sets

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Does Oracle have the ability to do Multiple Result Sets? Has anyone done this or something similar w/Oracle?

By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30075

Yes. Oracle allows multiple resultsets. I've done this in Sybase, but not in Oracle. It's the same idea in both databases though.

This article walks you through what to call.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
I am not sure about Jeanne comment. Oracle do support returning multiple resultset from a stored procedure but it has to be a REFCURSOR type. The standard API's for returning multiple resultsets like getMoreResults do not a expected implementation with orace jdbc driver.
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30075

I defer to Purushothaman. Like I said, I haven't done this in Oracle. I just assumed it would be the same as Sybase.
subject: Multiple Result Sets
Similar Threads
For Each ArrayList of Object in JSTL
JPA and multiple result sets
Multiple result sets possible with Oracle?
IBM 484 : Stmt.execute(Str) - multiple result sets?