From: Kris Jurka <books@ejurka.com>
To: Altaf Malik <mmalik_altaf@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: IllegalArgumentException in batch execution
Date: Wed, 9 Jun 2010 02:10:55 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.1006090209210.2333@leary.csoft.net> (raw)
In-Reply-To: <384952.35231.qm@web110413.mail.gq1.yahoo.com>
References: <384952.35231.qm@web110413.mail.gq1.yahoo.com>
On Tue, 8 Jun 2010, Altaf Malik wrote:
> All,
> I have noticed a strange behavior in jdbc. Consider the following code:
>
> PreparedStatement stmt = con.prepareStatement("insert into testtbl
> values(?,?)");
>
> stmt.setInt(1, 110);
> stmt.setString(2, "Hello\0 Mr.X");
> stmt.addBatch();
> stmt.executeBatch();
>
> When I execute this code, I get Two errors:
>
> (1):
> java.lang.IllegalArgumentException: org.postgresql.util.PSQLException: Zero
> bytes may not occur in string parameters.
This has been fixed in CVS.
Kris Jurka
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: books@ejurka.com, mmalik_altaf@yahoo.com
Subject: Re: IllegalArgumentException in batch execution
In-Reply-To: <alpine.BSO.2.00.1006090209210.2333@leary.csoft.net>
References: <384952.35231.qm@web110413.mail.gq1.yahoo.com> <alpine.BSO.2.00.1006090209210.2333@leary.csoft.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