db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marieke Vandamme <marieke.vanda...@tvh.be>
Subject setNull in select doesn't work
Date Mon, 24 Jul 2006 08:27:51 GMT

Hello,

We are trying to perform a select query to the Derby database with 
PreparedStatement

PreparedStatement ps = c.prepareStatement("select * from table where value 
= ?");
//several methods performed on statement (separately ofcourse)
1. ps.setNull(1,Types.VARCHAR);
2. ps.setObject(1, null, Types.VARCHAR);
3. ps.setString(1, null) ;

The table contains null values, but the resultset is empty for the 3 
cases.

When executing statement with query "select * from table where value is 
null", we get the wanted results, 
but we need to do it with setting parameters in preparedstatement.

We are using db-derby-snapshot-10.2.0.4-423199.

Is this a bug? Do we need to set any special parameters/settings?
Thanks!

**** DISCLAIMER **** 
<A HREF="http://www.tvh.be/newen/pages/emaildisclaimer.html"> http://www.tvh.be/newen/pages/emaildisclaimer.html
</A>

"This message is delivered to all addressees subject to the conditions set forth in the attached
disclaimer, which is an integral part of this message." 
Mime
View raw message