From FredP@abag.ca.gov Thu Feb 6 20:11:15 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 093784758E1 for ; Thu, 6 Feb 2003 15:11:15 -0500 (EST) Received: from iserver.abag.ca.gov (iserver.abag.ca.gov [198.31.87.3]) by postgresql.org (Postfix) with ESMTP id 462F54758FE for ; Thu, 6 Feb 2003 15:11:14 -0500 (EST) Received: from groupwise.abag.ca.gov (groupwise.abag.ca.gov [198.31.87.26]) by iserver.abag.ca.gov (8.12.4/8.12.4) with SMTP id h16KBEO8014579 for ; Thu, 6 Feb 2003 12:11:14 -0800 (PST) Received: from D01-Message_Server by groupwise.abag.ca.gov with Novell_GroupWise; Thu, 06 Feb 2003 12:11:14 -0800 Message-Id: X-Mailer: Novell GroupWise Internet Agent 5.5.6.1 Date: Thu, 06 Feb 2003 12:09:53 -0800 From: "Fred Parkinson" To: Subject: record locks? Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_A7F8D672.D1B0D1C5" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/37 X-Sequence-Number: 2655 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_A7F8D672.D1B0D1C5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Whenever I edit a postgresql record from a MS Access datasheet view or bou= nd 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 n= o 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 --=_A7F8D672.D1B0D1C5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Whenever I edit a postgresql  record from a MS Acc= ess=20 datasheet view or bound control, it seems to lock the record forever and=20 subsrquent edits result in "The record has been changed by another user bla= h=20 blah ..." and I can no longer edit that record from the datasheet view or b= ound=20 control (though I can execute a SQL query to update it).
 
We are using postgresql 7.2 and ODBC driver=20 7.02.00.01
 
This persists even if I delete the linked table and rel= ink it,=20 or close and restart Access.
 
Any ideas?
 
Fred Parkinson
 
--=_A7F8D672.D1B0D1C5-- From t.matiisen@aprote.ee Fri Feb 7 09:38:43 2003 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 From FredP@abag.ca.gov Thu Feb 13 21:05:35 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 78C33475957 for ; Thu, 13 Feb 2003 16:05:35 -0500 (EST) Received: from iserver.abag.ca.gov (iserver.abag.ca.gov [198.31.87.3]) by postgresql.org (Postfix) with ESMTP id A9667474E5C for ; Thu, 13 Feb 2003 16:05:32 -0500 (EST) Received: from groupwise.abag.ca.gov (groupwise.abag.ca.gov [198.31.87.26]) by iserver.abag.ca.gov (8.12.4/8.12.4) with SMTP id h1DL5Xo3011656 for ; Thu, 13 Feb 2003 13:05:33 -0800 (PST) Received: from D01-Message_Server by groupwise.abag.ca.gov with Novell_GroupWise; Thu, 13 Feb 2003 13:05:33 -0800 Message-Id: X-Mailer: Novell GroupWise Internet Agent 5.5.6.1 Date: Thu, 13 Feb 2003 13:04:55 -0800 From: "Fred Parkinson" To: , Subject: Re: record locks? Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_9FC0E08D.553455A8" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/63 X-Sequence-Number: 2681 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_9FC0E08D.553455A8 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Thanks for responding, clearly i should have been more specific in my descr= iption of the problem. The linked table is a table, created in postgres with the CREATE TABLE comm= and. I am trying to update boolean fields through check boxs in Access datesheet= view, and also through bound controls on forms. I can insert a record through the Access datasheet view by typing a value i= nto the key field in the '*' record (the 'add new record' record) After that I can successfully update fields only if i do so before i leave = that record. After that, any other changes I try to make to the data, for example check = a check box to update a boolean field, i get the "the record has been changed by another u= ser..." message and changes are dropped. I can make updates to the table subsequently only if i execute sql commands= with the Access execute function. Since that form of update works, executing a sql query in access, the syste= m is correctly locating records by the key field value. When I ran the odbc driver install i unchecked the 'bool as char' box. I am actually doing no explicit record locking,=20 No one else is locking the record because we are testing a new system in a = very small development community (2 developers) and the other person is not= here! When our postgres/unix administrator returns i will ask him to turn on psq= lodbc logging to see what postgres thinks of attempts to update the fields = through bound Access controls and the Access datasheet view. Thanks for your help with this matter! Fred Parkinson >>> "Tambet Matiisen" 02/07/03 01:11AM >>> 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 =3D newvalue WHERE id =3D old_id AND col1 =3D oldvalu= e1 AND col2 =3D 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 =3D 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster --=_9FC0E08D.553455A8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Thanks for responding, clearly i should have been more= =20 specific in my description of the problem.
 
The linked table is a table, created in postgres with t= he=20 CREATE TABLE command.
I am trying to update boolean fields through check boxs= in=20 Access datesheet view, and also through bound controls on forms.
 
I can insert a record through the Access datasheet= view=20 by typing a value into the key field in the '*' record
(the 'add new record' record)
After that I can successfully update fields only if i d= o so=20 before i leave that record.
After that, any other changes I try to make to the data= , for=20 example check a check box to
update a boolean field, i get the "the record has been = changed=20 by another user..." message and changes are dropped.
I can make updates to the table subsequently only if i = execute=20 sql commands with the Access execute function.
Since that form of update works, executing a sql query = in=20 access, the system is correctly locating records by the key field=20 value.
 
When I ran the odbc driver install i unchecked the 'boo= l as=20 char' box.
 
I am actually doing no explicit record locking,
 
No one else is locking the record because we are testing a new system = in a=20 very small development community (2 developers) and the other person is not= =20 here!
 
When our postgres/unix administrator returns  i will ask him to t= urn=20 on psqlodbc logging to see what postgres thinks of attempts to update the f= ields=20 through bound Access controls and the Access datasheet view.
 
Thanks for your help with this matter!
 
Fred Parkinson

>>> "Tambet Matiisen"=20 <t.matiisen@aprote.ee> 02/07/03 01:11AM >>>
Is your linke= d=20 table actually a view with insert/update/delete rules? Then
the update= =20 through bound controls will not work in 7.2. 7.3 resolves=20 the
issue.

Otherwise the problem could be float (or other non-exa= ct)=20 columns in your
table. Access remembers old values of record and when=20 updating, it adds them
to where condition:

UPDATE table SET col1 = =3D=20 newvalue WHERE id =3D old_id AND col1 =3D oldvalue1 AND
col2 =3D=20 oldvalue2;

The mentioned error is returned when the update returns 0= =20 modified rows -
someone has changed the record and old values are not cu= rrent=20 any more. This
is called optimistic locking.

The problem is, that= when=20 Access remembers float values, it sometimes rounds
them a bit.

se= lect=20 1/3::float, 0.333333333333333, 1/3::float =3D=20 0.333333333333333;

    =20 ?column?      |    =20 ?column?      |=20 ?column?
-------------------+-------------------+----------
0.3333333= 33333333=20 | 0.333333333333333 | f
(1 row)

So the optimistic locking conditi= on is=20 not true any more, although the
record has not changed.

You have = to=20 switch on psqlodbc logging and see, what query Access executes.
Then you= have=20 determine, what column is causing the error. Then you could
change datat= ype=20 of the column. Or you could build a view which rounds the
value, add=20 insert/update/delete rules to the view and do all database
manipulation= =20 through view. I have seen this problem before in this list, so
maybe som= eone=20 has better solution.

  Tambet

----- Original Message=20 -----
From: Fred Parkinson
To: pgsql-odbc@postgresql.org
Sent:=20 Thursday, February 06, 2003 10:09 PM
Subject: [ODBC] record=20 locks?


Whenever I edit a postgresql  record from a MS Acces= s=20 datasheet view or
bound control, it seems to lock the record forever and= =20 subsrquent edits
result in "The record has been changed by another user = blah=20 blah ..." and I
can no longer edit that record from the datasheet view o= r=20 bound control
(though I can execute a SQL query to update it).

We= are=20 using postgresql 7.2 and ODBC driver 7.02.00.01

This persists even i= f I=20 delete the linked table and relink it, or close and
restart=20 Access.

Any ideas?

Fred=20 Parkinson


---------------------------(end of=20 broadcast)---------------------------
TIP 4: Don't 'kill -9' the=20 postmaster
--=_9FC0E08D.553455A8-- From tambet.matiisen@mail.ee Fri Feb 14 16:06:32 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0042A474E4F for ; Fri, 14 Feb 2003 11:06:32 -0500 (EST) Received: from MX4.estpak.ee (ld1.estpak.ee [194.126.101.98]) by postgresql.org (Postfix) with ESMTP id 55534474E42 for ; Fri, 14 Feb 2003 11:06:31 -0500 (EST) Received: from tmkodu (80-235-71-26-dsl.trt.estpak.ee [80.235.71.26]) by MX4.estpak.ee (Postfix) with SMTP id 4354D1D001A; Fri, 14 Feb 2003 18:06:34 +0200 (EET) Message-ID: <003601c2d443$a62539b0$0100a8c0@kodunet.ee> From: "Tambet Matiisen" To: "Fred Parkinson" , References: Subject: Re: record locks? Date: Fri, 14 Feb 2003 18:10:52 +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-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/71 X-Sequence-Number: 2689 You can turn on the psqlodbc logging by yourself. Just open Control Panel -> Administrative Tools -> Data Sources (ODBC), find your DSN and click Configure. Tambet ----- Original Message ----- From: Fred Parkinson To: t.matiisen@aprote.ee ; pgsql-odbc@postgresql.org Sent: Thursday, February 13, 2003 11:04 PM Subject: Re: [ODBC] record locks? Thanks for responding, clearly i should have been more specific in my description of the problem. The linked table is a table, created in postgres with the CREATE TABLE command. I am trying to update boolean fields through check boxs in Access datesheet view, and also through bound controls on forms. I can insert a record through the Access datasheet view by typing a value into the key field in the '*' record (the 'add new record' record) After that I can successfully update fields only if i do so before i leave that record. After that, any other changes I try to make to the data, for example check a check box to update a boolean field, i get the "the record has been changed by another user..." message and changes are dropped. I can make updates to the table subsequently only if i execute sql commands with the Access execute function. Since that form of update works, executing a sql query in access, the system is correctly locating records by the key field value. When I ran the odbc driver install i unchecked the 'bool as char' box. I am actually doing no explicit record locking, No one else is locking the record because we are testing a new system in a very small development community (2 developers) and the other person is not here! When our postgres/unix administrator returns i will ask him to turn on psqlodbc logging to see what postgres thinks of attempts to update the fields through bound Access controls and the Access datasheet view. Thanks for your help with this matter! Fred Parkinson From FredP@abag.ca.gov Fri Feb 14 21:58:55 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7682B475EB9 for ; Fri, 14 Feb 2003 16:58:55 -0500 (EST) Received: from iserver.abag.ca.gov (iserver.abag.ca.gov [198.31.87.3]) by postgresql.org (Postfix) with ESMTP id 495354761DD for ; Fri, 14 Feb 2003 16:47:53 -0500 (EST) Received: from groupwise.abag.ca.gov (groupwise.abag.ca.gov [198.31.87.26]) by iserver.abag.ca.gov (8.12.4/8.12.4) with SMTP id h1ELlso3003097 for ; Fri, 14 Feb 2003 13:47:54 -0800 (PST) Received: from D01-Message_Server by groupwise.abag.ca.gov with Novell_GroupWise; Fri, 14 Feb 2003 13:47:53 -0800 Message-Id: X-Mailer: Novell GroupWise Internet Agent 5.5.6.1 Date: Fri, 14 Feb 2003 13:47:45 -0800 From: "Fred Parkinson" To: , Subject: Re: record locks? Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_66391819.91F0916A" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/73 X-Sequence-Number: 2691 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_66391819.91F0916A Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Wow!! This must have been one of those quantum particle-like problems: as soon as i turned on psqlodbc loggiing to look closely at the problem, it= vanished!!!!! Thanks a LOT for your help. Fred Parkinson Association of Bay Area Governments >>> "Tambet Matiisen" 02/14/03 08:10AM >>> You can turn on the psqlodbc logging by yourself. Just open Control Panel -> Administrative Tools -> Data Sources (ODBC), find your DSN and click Configure. Tambet ----- Original Message ----- From: Fred Parkinson To: t.matiisen@aprote.ee ; pgsql-odbc@postgresql.org Sent: Thursday, February 13, 2003 11:04 PM Subject: Re: [ODBC] record locks? Thanks for responding, clearly i should have been more specific in my description of the problem. The linked table is a table, created in postgres with the CREATE TABLE command. I am trying to update boolean fields through check boxs in Access datesheet view, and also through bound controls on forms. I can insert a record through the Access datasheet view by typing a value into the key field in the '*' record (the 'add new record' record) After that I can successfully update fields only if i do so before i leave that record. After that, any other changes I try to make to the data, for example check a check box to update a boolean field, i get the "the record has been changed by another user..." message and changes are dropped. I can make updates to the table subsequently only if i execute sql commands with the Access execute function. Since that form of update works, executing a sql query in access, the system is correctly locating records by the key field value. When I ran the odbc driver install i unchecked the 'bool as char' box. I am actually doing no explicit record locking, No one else is locking the record because we are testing a new system in a very small development community (2 developers) and the other person is not here! When our postgres/unix administrator returns i will ask him to turn on psqlodbc logging to see what postgres thinks of attempts to update the fields through bound Access controls and the Access datasheet view. Thanks for your help with this matter! Fred Parkinson --=_66391819.91F0916A Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Wow!! This must have been one of those quantum particle= -like=20 problems:
as soon as i turned on psqlodbc loggiing to look closel= y at=20 the problem, it vanished!!!!!
 
Thanks a LOT for your help.
 
Fred Parkinson
Association of Bay Area Governments


>>> "Tambet Matiisen" <tambet.matiisen@mail.ee>= =20 02/14/03 08:10AM >>>
You can turn on the psqlodbc logging by=20 yourself. Just open Control Panel ->
Administrative Tools -> Data= =20 Sources (ODBC), find your DSN and click
Configure.

 =20 Tambet

----- Original Message -----
From: Fred Parkinson
To:= =20 t.matiisen@aprote.ee ; pgsql-odbc@postgresql.org
Sent: Thursday, Februar= y 13,=20 2003 11:04 PM
Subject: Re: [ODBC] record locks?


Thanks for=20 responding, clearly i should have been more specific in my
description o= f the=20 problem.

The linked table is a table, created in postgres with the C= REATE=20 TABLE
command.
I am trying to update boolean fields through check box= s in=20 Access datesheet
view, and also through bound controls on forms.

= I can=20 insert a record through the Access datasheet view by typing a value
into= the=20 key field in the '*' record
(the 'add new record' record)
After that = I can=20 successfully update fields only if i do so before i leave
that=20 record.
After that, any other changes I try to make to the data, for exa= mple=20 check a
check box to
update a boolean field, i get the "the record ha= s=20 been changed by another
user..." message and changes are dropped.
I c= an=20 make updates to the table subsequently only if i execute sql commands
wi= th=20 the Access execute function.
Since that form of update works, executing = a sql=20 query in access, the system
is correctly locating records by the key fie= ld=20 value.

When I ran the odbc driver install i unchecked the 'bool as c= har'=20 box.

I am actually doing no explicit record locking,

No one e= lse=20 is locking the record because we are testing a new system in a
very smal= l=20 development community (2 developers) and the other person is=20 not
here!

When our postgres/unix administrator returns  i wi= ll=20 ask him to turn on
psqlodbc logging to see what postgres thinks of attem= pts=20 to update the
fields through bound Access controls and the Access datash= eet=20 view.

Thanks for your help with this matter!

Fred=20 Parkinson

--=_66391819.91F0916A--