Skip site navigation (1) Skip section navigation (2)

Re: bug with 8.X level 4 driver?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Damon Anderson <anderson(at)eclipse(dot)knight-rider(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: bug with 8.X level 4 driver?
Date: 2005-12-06 15:34:06
Message-ID: Pine.BSO.4.61.0512061031060.5324@leary.csoft.net (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-12-06 15:37:45
Subject: Re: Problem with 8.1 driver
Previous:From: Jan de VisserDate: 2005-12-06 13:37:50
Subject: Re: pgsql XA with weblogic 8.1?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group