db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen <Oystein.Grov...@Sun.COM>
Subject Re: Bug in Embedded Driver?
Date Sat, 31 Mar 2007 12:24:04 GMT
Xavier Hanin wrote:

>             con.createStatement().executeUpdate("create table Issue ( ID 
> char(50) )");
>             PreparedStatement st = con.prepareStatement("select count(*) 
> from Issue where ? is null");
>             st.setNull(1, Types.VARBINARY);

I do not think that CHAR and VARBINARY are compatible types.  Try using 
Types.VARCHAR instead.

In this case I think it is the client driver that is wrong.  It is not 
first example where it allows type conversions that are not according to 
the spec. (Ref. https://issues.apache.org/jira/browse/DERBY-1501)

--
Øystein



Mime
View raw message