X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0EB339FA34A for ; Wed, 6 Sep 2006 20:30:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 89959-07 for ; Wed, 6 Sep 2006 20:30:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (smtp.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 57DA19FA103 for ; Wed, 6 Sep 2006 20:30:45 -0300 (ADT) Received: (qmail 20131 invoked from network); 7 Sep 2006 08:30:43 +0900 X-Authentication: inoue was authenticated by mail.tpf.co.jp at 7 Sep 2006 08:30:43 +0900 Received: from unknown (HELO ?192.168.11.3?) (219.61.40.10) by mail.tpf.co.jp with SMTP; 7 Sep 2006 08:30:43 +0900 Message-ID: <44FF5A21.7030408@tpf.co.jp> Date: Thu, 07 Sep 2006 08:30:41 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: greg.campbell@us.michelin.com CC: pgsql-odbc@postgresql.org Subject: Re: '= NULL' is not the same as 'IS NULL' References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.027 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/47 X-Sequence-Number: 8198 greg.campbell@us.michelin.com wrote: > I have a question for the mailing list. > More generally, let us assume that when in Access, you change a record > focus (after a delete, insert, update. upon opening a form, or moving the > Access cursor), it may be reasonable to execute one or more SELECT queries > to refresh the form. > Why does it tend to use the WHERE clause to match each field value, instead > of a primary key for a match? What are the conditions that force primary > key usages vs. "match every field" syntax? > From ancient times it's programmers' routine work to verify if the target record was changed or not before updat/deleting the record. MS seems to prefer the way to verify and update/delete at a time and executes an update/delete query with WHERE clause to match each field value. If the query update/deletes exactly one row it means that both the verification and the execution are OK. If it update/deletes no row it probably meas that someone changed the record somewhere. IMHO it's a lot simpler than the way to get the record with lock and verify the change by the program by itself and update/delete the record. regarsds, Hiroshi Inoue