The field values were ok (all actually non-null in the DB), and so the
parameter value could not be null either as :CustomerCode was from a master
dataset derived from the same DB (with another query). The problem I was
trying to get around is that under the rules of SQL the evaluation of (a=b)
will fail if both a and b are null, hence (a=b) or (a is null and b is
null) covers both possibilities. Any suggestions on alternatives?


>It may be worth focussing on whether it is failing on the field value or
the parameter value.

As a matter of course I would have tested the value of the [parameter
":CustomerCode" and changed the where clause to either (CustomerCode =
:CustomerCode) or just (CustomerCode IS NULL).

I haven't experienced this problem, with "is null" that is, but I also
avoid complex mixtures of AND and OR since I found that 16 and 32 bit BDE
had different, and mutually exclusive, problems with complex WHERE clauses.
This was all from the transition from D1 to D2 so it's old info though.


    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]

Reply via email to