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

> But this is a bug, don't you?

it isn't. It's just the way SQL is supposed to work and actually works
in Firebird (and all other engines I know, BTW).

> <where>
> COLUMN1 = ? and COLUMN2 = ?
> </where>
> <param>
> <index>1</index>
> <value/> <---- Null value
> </param>

this would make for a bad SQL statement; you can either change the
format of the xml request to something less language-dependent, such as
(OTTOMH):

> <where>
> <whereitem>
> <fieldname>COLUMN1</fieldname>
> <operator>equality</operator>
> <fieldvalue>1</fieldvalue>
> </whereitem>
> <whereconnector>and</whereconnector>
> <whereitem>
> <fieldname>COLUMN1</fieldname>
> <operator>isnull</operator>
> </whereitem>
> </where>(*)

or you'll have to reparse your <where> node in case any param is null,
and change the SQL text accordingly.
The only way to test for NULL in SQL (and this is true for every SQL
database) is the IS NULL operator.
Ciao

(*) node-baase like in your example; I'd rather make <whereitem>
attribute-based for brevity's sake.
--
____
_/\/ando