X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AE1409FB3BF for ; Wed, 6 Sep 2006 13:41:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 85569-04-3 for ; Wed, 6 Sep 2006 16:41:32 +0000 (UTC) X-Greylist: delayed 23:22:54.896216 by SQLgrey- Received: from hoboe2bl1.telenet-ops.be (hoboe2bl1.telenet-ops.be [195.130.137.73]) by postgresql.org (Postfix) with ESMTP id 3ABB59FB3B2 for ; Wed, 6 Sep 2006 13:40:43 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hoboe2bl1.telenet-ops.be (Postfix) with SMTP id 7C952124066 for ; Wed, 6 Sep 2006 18:40:41 +0200 (CEST) Received: from smtp.vialila.lan (d51526810.access.telenet.be [81.82.104.16]) by hoboe2bl1.telenet-ops.be (Postfix) with ESMTP id 672A912405D for ; Wed, 6 Sep 2006 18:40:41 +0200 (CEST) Received: from localhost (aragorn [127.0.0.1]) by smtp.vialila.lan (Postfix) with ESMTP id 13DC66CD0 for ; Wed, 6 Sep 2006 15:55:10 +0200 (CEST) Received: from smtp.vialila.lan ([127.0.0.1]) by localhost (aragorn [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 31959-03 for ; Wed, 6 Sep 2006 15:55:09 +0200 (CEST) Received: from legolas.vialila.lan (legolas.vialila.lan [192.168.93.4]) by smtp.vialila.lan (Postfix) with ESMTP id 49CC93F06 for ; Wed, 6 Sep 2006 15:55:09 +0200 (CEST) From: Geert Janssens Organization: Kobalt W.I.T. To: pgsql-odbc@postgresql.org Subject: '= NULL' is not the same as 'IS NULL' Date: Wed, 6 Sep 2006 15:55:12 +0200 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609061555.13070.info@kobaltwit.be> X-Virus-Scanned: amavisd-new at vialila.lan X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/39 X-Sequence-Number: 8190 Hi, I managed to fix my write conflict problems in Ms Access. Now I already stumble upon another issue: I have a psqlODBC linked table 'tarticles' in my Ms Access 2000 application, and a form 'Artikels' to make changes to this table. One peculiarity of this form is, that one of the varchar fields gets set programmatically. For example, when I create a new record, and save it (by moving to a new empty record), I find this in the commlog: conn=995a250, query='INSERT INTO "public"."tarticles" ("vendorid","reference","category","type","islot","amount","invoicecurrency", "invoiceprice","priceunit","pricecustomer","invoiceid","check","label","imgname","amountlot") VALUES (235,'00-00007',2,7,'1','100',1,'100','1','0',921,'0','Diverse',NULL,'100')' The field imgname was set to NULL programmatically. When I move one record back in the form, to the record that I just added, it will show #deleted# in every field. This move back is represented in the commlog by: conn=995a250, query='declare "SQL_CUR0995ED90" cursor with hold for SELECT "public"."tarticles"."articleid" FROM "public"."tarticles" WHERE "vendorid" = 235 AND "reference" = '00-00007' AND "category" = 2 AND "type" = 7 AND "islot" = '1' AND "amount" = '100' AND "invoicecurrency" = 1 AND "invoiceprice" = '100' AND "priceunit" = '1' AND "pricecustomer" = '0' AND "invoiceid" = 921 AND "check" = '0' AND "label" = 'Diverse' AND "imgname" = NULL AND "amountlot" = '100'' I tried this query directly in phpPgSQL, and indeed it returns no results. On the other hand, if I modify "imgname" = NULL to "imgname" IS NULL, the query works fine. I found references via google that '= NULL' and 'IS NULL' are not the same thing as far as PostgreSQL is concerned, which I understand. They even provide a runtime command to override this: SET transform_null_equals TO ON; Unfortunatly it seems this should be called before each query that is affected. It's not set globally. So I'm not sure how I can solve this issue. I could work around it and make sure no NULL values can happen, but I wonder if there might be an easier way by means of a preference setting in Access or psqlODBC or PostgreSQL. Has anybody else stumbled upon this issue ? Thanks, Geert -- Kobalt W.I.T. Web & Information Technology Brusselsesteenweg 152 1850 Grimbergen Tel : +32 479 339 655 Email: info@kobaltwit.be