Subject Re: [firebird-support] IS NULL and query parameters
Author Carlos Guzmán Álvarez

>Why would you try to do this? Null isn't a value.
>What's wrong with
>WHERE aValue = ? OR aValue IS NULL
Huummm ... in the case of the .net provider to generate updates
and deletes commands in the FbCommandBuilder class in the same
way as other data providers does (like the oracle and
the sql server one).

A sample (named parameters are replaced with a ?
in the .net provider):

OrderID = @p1 ,
ProductID = @p2 ,
UnitPrice = @p3 ,
Quantity = @p4 ,
Discount = @p5
(OrderID = @p6) AND
(ProductID = @p7) AND
((UnitPrice IS NULL AND @p8 IS NULL) OR (UnitPrice = @p9)) AND
((Quantity IS NULL AND @p10 IS NULL) OR (Quantity = @p11)) AND
((Discount IS NULL AND @p12 IS NULL) OR (Discount = @p13))

There are other cases, a .net provider user (he has sent
an email about this, this week, to the .net provider list)
is trying to add firebird support to an or mapper that now supports sql
server and oracle and that generates commands in the same
way (i don't know how he is going to solve this for firebird)

I haven't reviewed it in deep yet but this can be
needed too for the .net provider when the .net 2.0 gets
released if i want (and i want :) if possible) to take
advantage of the new DbCommandBuilder base class that
does the generation that way too.

And finally i'm curious about what that isn't allowed :)

Best regards

Carlos Guzmán Álvarez