Subject Re: [ib-support] setNull doesn't work
Author Claudio D'Angelo
What i can do ?

I've an xml with value's column and I don't know if a value is null.
I make the where condition dinamically and i set the ? with the value
in the xml.
I can't do "DETRANSFER is null" or any other columns

At 08.58 29/07/2002 +0200, you wrote:
>Hi,
>
> > I've a problem with interbase or interclient.
> > I've wrote this source
> > ...
> > String select = "select * from xsysapps where DETRANSFER = ?";
>
>Notice the two different statements:
>
>select * from xsysapps where DETRANSFER = NULL
>
>and
>
>select * from xsysapps where DETRANSFER is null
>
>The first one will never return any rows -- NULL = NULL will
>always evaluate into False.
>
>The latter is the only way to check for NULL.
>
>Martijn Tonies
>InterBase Workbench - the developer tool for InterBase and Firebird
>http://www.interbaseworkbench.com
>
>Upscene Productions
>http://www.upscene.com
>
>"This is an object-oriented system.
>If we change anything, the users object."
>
>
> > 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
>
>
>
>
>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/

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]