From: hans wulf <lotu1@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: PreparedStatement batch statement impossible
Date: Wed, 02 Mar 2011 15:38:01 +0100
Message-ID: <20110302143801.135430@gmx.net> (raw)
Hi,
when using addBatch() and executeBatch() it is impossible to get the generated keys. addBatch() fails with an BatchUpdateException because it isn't expecting results. I am using postgres 9.0 and the newest 9.0_801 JDBC-Thingy.
The statement is generated with cn.prepareStatement(sqlStufff,Statement.RETURN_GENERATED_KEYS);
Code works fine with Mysql, so I guess it's a driver problem.
Until this bug is fixed, what is the workaround too use batchupdates on more than one table? Tables beeing linked by generated keys.
Any ideas?
Thanks so much.
--
Schon gehört? GMX hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://www.gmx.net/de/go/toolbar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: lotu1@gmx.net
Subject: Re: PreparedStatement batch statement impossible
In-Reply-To: <20110302143801.135430@gmx.net>
References: <20110302143801.135430@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox