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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2005-12-06 15:37:45 | Re: Problem with 8.1 driver |
Previous Message | Jan de Visser | 2005-12-06 13:37:50 | Re: pgsql XA with weblogic 8.1? |