Updating Records Triggers Write Conflict (1 Viewer)

KjWhal

Registered User.
Local time
Today, 12:08
Joined
Jan 5, 2007
Messages
60
I have an MS Access frontend to a SQL Server 2000 database. The database was originally an Access mdb that I upsized using SQL Server's DTS wizard.

After setting the primary keys and identities for the original autonumber fields I began to test the interface to make sure it still worked.

I can insert and delete new records fine however any time I try to change an existing value I get a Write Conflict messagebox and the option to save the record is greyed out.

Clicking drop changes results in error '3197' which states you and another user tried to change the same data. However I am the only user. logged into this database (as it is being tested, not in production).

Anyone have any ideas as to what is causing this?

Does this thread belong here or a different forum?
 

p.perez

Registered User.
Local time
Today, 12:08
Joined
Jan 29, 2018
Messages
12
Hi!
I´m using this workaround and it has worked for me: Front end: Ms Access Backend: Mysql

On the Before update event of a given field:

Code:
Private Sub tbl_comuna_id_comuna_BeforeUpdate(Cancel As Integer)

If Me.tbl_comuna_id_comuna.OldValue = Me.tbl_comuna_id_comuna.Value Then 
Cancel = True 
Undo 
End If 
End Sub

I have a question if you guys can help me: Is there a way to change "field_name" in this case tbl_comuna_id.comuna to "any field name" depending on the field that you put this event? The idea is to call this function instead of editing the field name for each field that may have writing conflict

Thanks!
 
Last edited:

Users who are viewing this thread

Top Bottom