X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D5FE647629C for ; Fri, 7 Feb 2003 04:38:43 -0500 (EST) Received: from ns.aprote.ee (ns.aprote.ee [80.235.78.106]) by postgresql.org (Postfix) with ESMTP id 3C7EC47690E for ; Fri, 7 Feb 2003 04:11:51 -0500 (EST) Received: Message by Barricade ns.aprote.ee with ESMTP id h179EIK03477 for ; Fri, 7 Feb 2003 11:14:18 +0200 Received: from TAMBETM ([192.168.1.14]) by black.aprote.com with Microsoft SMTPSVC(5.0.2195.5329); Fri, 7 Feb 2003 11:11:51 +0200 Message-ID: <006001c2ce88$f3879ba0$0e01a8c0@aprote.com> From: "Tambet Matiisen" To: "Fred Parkinson" , References: Subject: Re: record locks? Date: Fri, 7 Feb 2003 11:11:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-OriginalArrivalTime: 07 Feb 2003 09:11:51.0673 (UTC) FILETIME=[F38C5690:01C2CE88] X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/41 X-Sequence-Number: 2659 Is your linked table actually a view with insert/update/delete rules? Then the update through bound controls will not work in 7.2. 7.3 resolves the issue. Otherwise the problem could be float (or other non-exact) columns in your table. Access remembers old values of record and when updating, it adds them to where condition: UPDATE table SET col1 = newvalue WHERE id = old_id AND col1 = oldvalue1 AND col2 = oldvalue2; The mentioned error is returned when the update returns 0 modified rows - someone has changed the record and old values are not current any more. This is called optimistic locking. The problem is, that when Access remembers float values, it sometimes rounds them a bit. select 1/3::float, 0.333333333333333, 1/3::float = 0.333333333333333; ?column? | ?column? | ?column? -------------------+-------------------+---------- 0.333333333333333 | 0.333333333333333 | f (1 row) So the optimistic locking condition is not true any more, although the record has not changed. You have to switch on psqlodbc logging and see, what query Access executes. Then you have determine, what column is causing the error. Then you could change datatype of the column. Or you could build a view which rounds the value, add insert/update/delete rules to the view and do all database manipulation through view. I have seen this problem before in this list, so maybe someone has better solution. Tambet ----- Original Message ----- From: Fred Parkinson To: pgsql-odbc@postgresql.org Sent: Thursday, February 06, 2003 10:09 PM Subject: [ODBC] record locks? Whenever I edit a postgresql record from a MS Access datasheet view or bound control, it seems to lock the record forever and subsrquent edits result in "The record has been changed by another user blah blah ..." and I can no longer edit that record from the datasheet view or bound control (though I can execute a SQL query to update it). We are using postgresql 7.2 and ODBC driver 7.02.00.01 This persists even if I delete the linked table and relink it, or close and restart Access. Any ideas? Fred Parkinson