db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunitha Kambhampati <ksunitha...@gmail.com>
Subject Re: setNull on prepared statement not working?
Date Mon, 07 Feb 2005 23:11:32 GMT
Jeremiah Jahn wrote:

>	insertPreparedStatement.setNull(5,Types.NULL); where column is a
>timestamp column.
>
>This is with the latest official release(10.0.2.1). running on java 5
>and linux.
>  
>
Actually, if you are trying to set null on a column with type timestamp 
, I think it should be

        insertPreparedStatement.setNull(5,Types.TIMESTAMP);

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html#setNull(int,%20int)

Hope this helps,
Sunitha.






Mime
View raw message