Thread: jdbc driver Multiple Resultsets

jdbc driver Multiple Resultsets

From
"Rajesh Balla"
Date:
Does the jdbc driver really support Multiple Resultsets?
If not, does the backend return multiple resultsets(for more than one query concatenated together)?

ie., For a query like
    ResultSet rs = stmt.executeQuery("select * from table1; select * from table2;");
    Does the resultset contain both the resultsets or only one result set.

Note:
On Sat, 25 Apr 1998, Bruce Momjian wrote:

The JDBC spec allows for multiple ResultSet`s to be returned from a query, and our driver handles this already.
......
But when we tried doing the above query, the resultset had only the first resultset.

So,Does the jdbc driver really support Multiple Resultsets?

Thanks,
Rajesh


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html

Re: jdbc driver Multiple Resultsets

From
Peter T Mount
Date:
Quoting Rajesh Balla <bnrajesh@lycos.com>:

> Does the jdbc driver really support Multiple Resultsets?
> If not, does the backend return multiple resultsets(for more than one
> query concatenated together)?

The driver has had the capability for years. However the backend doesn't
support this (AFAIK).

> ie., For a query like
>     ResultSet rs = stmt.executeQuery("select * from table1; select *
> from table2;");

This isn't proper JDBC. Multiple ResultSet's is where a stored procedure
returns them, not multiple queries.

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/