From: Hiroshi Inoue <inoue@tpf.co.jp>
To: greg.campbell@us.michelin.com
Cc: pgsql-odbc@postgresql.org
Subject: Re: '= NULL' is not the same as 'IS NULL'
Date: Thu, 07 Sep 2006 08:30:41 +0900
Message-ID: <44FF5A21.7030408@tpf.co.jp> (raw)
In-Reply-To: <OFF7CD601C.BCB58AFE-ON852571E1.007739C3-852571E1.00798EE6@michelin.com>
References: <OFF7CD601C.BCB58AFE-ON852571E1.007739C3-852571E1.00798EE6@michelin.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, greg.campbell@us.michelin.com
Subject: Re: '= NULL' is not the same as 'IS NULL'
In-Reply-To: <44FF5A21.7030408@tpf.co.jp>
References: <OFF7CD601C.BCB58AFE-ON852571E1.007739C3-852571E1.00798EE6@michelin.com> <44FF5A21.7030408@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox