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