Re: Parametrized query fails
Posted in 1996
Alexander Ponomarenko <shura@bitcom.msk.ru> wrote:
>Hi all!
>
>I use Informix OnLine 6.0WF1 with Delphi and have serious problem with
>parametrized queries:
>When I execute something like:
>select * from customers where address = :address,
>and when I assign :address to NULL, Delphi ALWAYS return empty cursor,>altough there are lots of records where address is NULL. I test that with
>IDAPI Informix driver of Delphi 1.02, Informix CLI 2.0 Driver, and Q+E Driver 1.2.
>I wrote small test with MS-Access 2.0, the same thing. There is no problem
>with other servers like Interbase.
>
>Thank you in advance. Any comments would be appreciated.
>---
>Shura.
>
You have the answer right there:
>altough there are lots of records where address is NULL. I test that with
=======================
You must use the IS clause when checking for NULL values.
select * from customers where address is null
Catalin
--
=========================================================================
Catalin Badea _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/
_/ _/ _/ _/ _/_/ _/
Senior Technical Architect _/ _/_/ _/ _/_/_/ _/ _/_/_/
_/ _/ _/ _/ _/ _/
Tecsys Inc. _/ _/_/_/ _/_/_/ _/_/_/ _/ _/_/_/
===== cat@tecsys.com =========== include system "disclaimer.4gh" =====
== http://www.virtualmarketplace.com/LEVEL3/ITEC/TECSYSE/TECSYSE.HP ===