Re: bug with 8.X level 4 driver?
От | Kris Jurka |
---|---|
Тема | Re: bug with 8.X level 4 driver? |
Дата | |
Msg-id | Pine.BSO.4.61.0512061031060.5324@leary.csoft.net обсуждение исходный текст |
Ответ на | bug with 8.X level 4 driver? (Damon Anderson <anderson@eclipse.knight-rider.org>) |
Список | 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 по дате отправления: