Problem with Write Conflict

M

mike91k

Problem: Error Message upon Changing/Editing information on the form:
"Write Conflict. This record has been changed by another user since you
started editing it. If you save the record, you will overwrite the changes
the other user made. Copying the changes to the clipboard will let you look
at the values the other user entered, and then paste your changes back in if
you decide to make changes." and Buttons available: [Save Record], [Copy to
Clipboard], [Drop Changes].


First important thing is that there's no problem editing directly from the
table at all.
I have to click [Save Record] around 7 times to get the changes saved. I
tried adding and editing a new record, it only required 1-2 times pressing
the [Save Record] button. So I believe that the number of times I have to
press the button is equivalent to the number of related tables the record
has.

The file is access 2000-based but running on access 2003.
The main table has one-to-one relationship with 8 tables, and one-to-many
with 3 tables.
The option "Default open mode" is set to "shared" and "Default record
locking" is set to "no locks".
The option "Open databases using rocord-level locking" is checked.
Enforce Referential Integrity option is checked under all the relationships
as well as Cascade Update and Delete options.

There were 20 identical access files and I had to merge them by copy/paste
and also append query for a few files. There are now 3051 records. The
database is about keeping each company's records such as yearly turnover
information, hires , products, raw materials used, stocks, list of
stockholders, addresses including all the branches, contacts.

I've searched a lot, most of the people having this problem are using MS SQL
or Oracle as a backend and the problem is with the "Yes/No" field. This is
not my problem cause the database is a single and standalone file. (Yes,
there were 20 files but now merged). Some forums say it may be because access
database cannot handle floating numbers very well..the turnover information
has a huge amount of data of each company. Most of the fields are of type
Currency.

Hope the information i stated is enough. It's 1.35am here and I can't think
of anything else :-|
 
A

Allen Browne

There are many factors that can contribute to this concurrency problem, such
as code running in the events of the control or form, memo fields on
multiple forms, corruptions in the database, interacting events, or other
users or processes. To solve it, the first step is to pin down the cause.

You say you can edit the data in the table okay, so the data is not corrupt.
Make sure your logic has only one form open that is bound to the table, i.e.
not a form and subform bound to the same table, or a 2nd form bound to the
same table, or other recordsets that are trying to handle the data at the
same time.

If you have code in any events, try temporarily commenting it out. If that
makes a difference, but half the code back in, and so on until you pin down
the culprit.

Often it helps to explicitly save before any line of code that requires the
record to be saved, such as moving record, closing the form, applying a
filter, changing the sort order, reassigning the RecordSource, finding a
record.

In my experience, the "record-level locking" can contribute to concurrency
issues. Since you are the only user in this database, I recommend you
disable this.

You say the table has 8 one-to-one relations. There might be valid design
reasons for doing that, but if the reason is because you can't put enough
fields in the one table, then the database is not correctly normalized. Not
sure if this is a contributing factor, but it might be--especially if you
are programmatically creating related records as well and they are shown in
this or another form.

If these are Access (JET) tables, there is no issue with Access handling
floating point or currency fields, and the fact that the data has been
merged from different sources should make no difference.

I have assumed you are the only user who has this database open.

HTH

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

mike91k said:
Problem: Error Message upon Changing/Editing information on the form:
"Write Conflict. This record has been changed by another user since you
started editing it. If you save the record, you will overwrite the changes
the other user made. Copying the changes to the clipboard will let you
look
at the values the other user entered, and then paste your changes back in
if
you decide to make changes." and Buttons available: [Save Record], [Copy
to
Clipboard], [Drop Changes].


First important thing is that there's no problem editing directly from the
table at all.
I have to click [Save Record] around 7 times to get the changes saved. I
tried adding and editing a new record, it only required 1-2 times
pressing
the [Save Record] button. So I believe that the number of times I have to
press the button is equivalent to the number of related tables the record
has.

The file is access 2000-based but running on access 2003.
The main table has one-to-one relationship with 8 tables, and one-to-many
with 3 tables.
The option "Default open mode" is set to "shared" and "Default record
locking" is set to "no locks".
The option "Open databases using rocord-level locking" is checked.
Enforce Referential Integrity option is checked under all the
relationships
as well as Cascade Update and Delete options.

There were 20 identical access files and I had to merge them by copy/paste
and also append query for a few files. There are now 3051 records. The
database is about keeping each company's records such as yearly turnover
information, hires , products, raw materials used, stocks, list of
stockholders, addresses including all the branches, contacts.

I've searched a lot, most of the people having this problem are using MS
SQL
or Oracle as a backend and the problem is with the "Yes/No" field. This is
not my problem cause the database is a single and standalone file. (Yes,
there were 20 files but now merged). Some forums say it may be because
access
database cannot handle floating numbers very well..the turnover
information
has a huge amount of data of each company. Most of the fields are of type
Currency.

Hope the information i stated is enough. It's 1.35am here and I can't
think
of anything else :-|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top