Re: bug with 8.X level 4 driver? - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: bug with 8.X level 4 driver?
Date
Msg-id Pine.BSO.4.61.0512061031060.5324@leary.csoft.net
Whole thread Raw
In response to bug with 8.X level 4 driver?  (Damon Anderson <anderson@eclipse.knight-rider.org>)
List pgsql-jdbc

On Tue, 6 Dec 2005, Damon Anderson wrote:

> So did some searching on the forums, lists, etc.. Changed it to this:
> try
> {
>    ppS = dd.createPPStatement();
>    ppS.setQueryString(
>                  "INSERT INTO sandwich_side (name) VALUES ('pickles');" +
>                  "INSERT INTO sandwich ( name, sideid) VALUES('club',
> currval('sandwich_side_id_seq'));" +
>                  "SELECT currval('sandwich_side_id_seq')");
>    ppS.initStatement();  //Prepares the statement.
>    ppS.getPreparedStatement().execute();
>    if( ppS.getPreparedStatement().getMoreResults())
>      rs = ppS.getPreparedStatement().getResultSet();

What this is going to retrieve is two update counts and two ResultSets.
This means you need to call getMoreResults twice to get to the first
ResultSet.

Kris Jurka

pgsql-jdbc by date:

Previous
From: "Vit Timchishin"
Date:
Subject: More about deadlock
Next
From: Kris Jurka
Date:
Subject: Re: Problem with 8.1 driver