X-Original-To: pgsql-odbc@postgresql.org Received: from smtp1.libero.it (smtp1.libero.it [193.70.192.51]) by postgresql.org (Postfix) with ESMTP id 7F13F474E53 for ; Mon, 17 Mar 2003 14:14:29 -0500 (EST) Received: from libero.it (151.26.176.96) by smtp1.libero.it (6.7.015) id 3E44E7FA00E78F70 for pgsql-odbc@postgresql.org; Mon, 17 Mar 2003 20:14:29 +0100 Message-ID: <3E761EF0.40901@libero.it> Date: Mon, 17 Mar 2003 20:16:00 +0100 From: Davide Romanini User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: The way Access/ODBC does updates to records Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/23 X-Sequence-Number: 2742 Hi, When I link postgreSQL tables to access, and try to modify a record, I found that odbc sends a query to postgresql containing a lot of fields in the WHERE clause. For example: I have a table names with fields id, name, surname, address. When I modify an existing record changing the name from Davide to Daniele, I expect that odbc sends a query like this: UPDATE names SET name='Daniele' WHERE id=1; or, in the case it looks for contamporary changes: UPDATE names SET name='Daniele' WHERE id=1 AND name='Davide'; Instead I see it uses: UPDATE names SET name='Daniele' WHERE id=1 AND name='Davide' AND surname='Romanini' AND address='My address'; It wouldn't be a problem, but with some datatypes (dates, doubles for example) and sometimes with triggers that change data before updates, it has problems like the "Another user is changing the same data". I want to know if there's a way to force access (or odbc) to use only primary key fields in the WHERE clause for un UPDATE (there aren't reasons to use other fields). Thanks, Romaz -- Davide Romanini