Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write Conflict 1

Status
Not open for further replies.

BBhushan

Programmer
Aug 17, 2001
3
US
My application has MS access front end and SQLserver 7.0 backend connected through ODBC. When a user tries to enter something or updates already existing fields,it gives the Write conflict message.It says Other user has changed the record, if you save it it will over write the changes made by the user. I want to overwrite but the save button is disabled on the form. I donot know whether this is a SQL server problem or MSACCESS or ODBC thing.
Thanks
Bharat
 

This is a common problem. The message results from optimistic locking. When you start editing a record, Access makes a snapshot of the original record contents. When you save the record, Access makes sure the record contents still match the original snapshot. If not, the record was changed by someone since the snapshot was made. Saving the record would overwrite those changes and Access prevents that.

Therefore, the possible causes of the message:

1. The record really was changed by another user, another form, or procedure in your application after you started editing in the form.

2. The record did not change, but Access thinks it did because the record contains one or more approximate data type fields that don't match the snapshot values. Approximate data types like float and real cannot be precisely represented. You can fix this problem by changing approximate fields to exact data types (decimal, numeric).

You can also add a TIMESTAMP column to your SQL table. Every TIMESTAMP value is unique so Access optimistic locking stores and checks only the TIMESTAMP value instead of comparing all columns. Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top