Subject | Re: [ib-support] setNull doesn't work |
---|---|
Author | Nando Dessena |
Post date | 2002-07-30T08:19:09Z |
Claudio,
in Firebird (and all other engines I know, BTW).
format of the xml request to something less language-dependent, such as
(OTTOMH):
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
> 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>this would make for a bad SQL statement; you can either change the
> COLUMN1 = ? and COLUMN2 = ?
> </where>
> <param>
> <index>1</index>
> <value/> <---- Null value
> </param>
format of the xml request to something less language-dependent, such as
(OTTOMH):
> <where>or you'll have to reparse your <where> node in case any param is null,
> <whereitem>
> <fieldname>COLUMN1</fieldname>
> <operator>equality</operator>
> <fieldvalue>1</fieldvalue>
> </whereitem>
> <whereconnector>and</whereconnector>
> <whereitem>
> <fieldname>COLUMN1</fieldname>
> <operator>isnull</operator>
> </whereitem>
> </where>(*)
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