2 Attachment(s)
calling stored procedures gives write conflict
I keep getting write conflicts when I try to change data of the current record. (I know, I shouldn't ;) )
Access is used as frontend to a postgres-database, which works fine, as long as I pass the values back to access and let vba-code do the changes. (see attached BtnCalkClick_vba.txt)
This is tiresome, if you have to change several fields, so I tried to change several fields in just one stored procedure without telling access about it ;). (see attached kalkAufpos_sql.txt)
I can even change fields in other records (line 'update "Auftrag" set "Start"...'), but not in the current record access is working on. (line 'update "AufPos" set "Kosten"...') - omitting this line: problem gone. (but no updated values either)
The form gets its data from an access-query which does _not_ include the fields I change.
The error occurs at the 'Me.Requery' line in the attached vba-code. Omitting this Requery is no solution - access complains when trying to close the form.
Is there a way to tell access to accept what I'm trying to do - i.e. clear its buffer or whatever?
I already found this information: http://dev.mysql.com/doc/refman/5.0/...ied-error.html which seems to be related to a similar error with mysql databases. The postgres table has a valid primary key (2 columns - could this be the problem?) and I already added a timestamp field to the table just to cure this problem. However, the fields involved are numeric(10,4) and numeric(10,2) - maybe use double? could this really cure the problem?
Any hints?
tia
lgkf