Subject Re: [ib-support] setNull doesn't work
Author Lucas Franzen
Claudio,

setting a param value to null will NOT return the rows which have NULL
in the field.

You have to change the SQL for doing so - as you did in your example.

Luc.



Claudio D'Angelo schrieb:
>
> Hi,
> I've a problem with interbase or interclient.
> I've wrote this source
> ...
> String select = "select * from xsysapps where DETRANSFER = ?";
> PreparedStatement ps = this.con.prepareStatement(select);
> ps.setNull(1, Types.DATE);
> ResultSet rs = ps.executeQuery();
> int i = 0;
> while(rs.next())
> i++;
> System.out.println(i);
> ...
> where all rows have DETRANSFER column to null.
> The output of i is 0
> if i change the select in "select * from xsysapps where DETRANSFER is null"
> The query propertly work
>
> Help me
>
> Claudio D'Angelo
> Software Consultant
> ObjectWay S.p.A.
> Via G.A. Boltraffio 7
> 20159 Milano (MI)
> http://www.objectway.it
>
> [Non-text portions of this message have been removed]
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/