Subject Re: [IBO] Re: Refreshing parameterised IB_Query when params change
Author Lester Caine
> The problem is that if you can't avoid NULL in your fields/tables,
> there is the situation where you have to test a field against some
> user provided values that can include null.
> Unfortunatly, if you try in code something like:
> where (:myid is null) or (customer_id = :myid)
> you have an exception raisen.

Don't allow NULL in those fields?

Where I am running ID's, I prevent NULL entries, or default
to 0 as the NULL entry.

When I am trying to build addresses, where some of the
fields are NULL, the database trigger switches them to blank
strings so that I can combine them with non null fields and
create a full answer rather than NULL.

As I said, the trick is to make the database do what YOU
want, rather than trying to compensate in your own code.
Only leave NULL where it will not cause a problem <g>

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services