Write Conflict in Form Save

  • Thread starter Thread starter Robin9876
  • Start date Start date
R

Robin9876

In an Access (2003) ADP form that has a few sub forms. When the
toolbar save command is used, the main form saves correctly and
returns an auto id which is used in the sub forms. When details are
then added in the sub forms and the same save command is used a write
conflict error message is displayed.

What causes this message and how can it be resolved?
 
I see two possibilities here:

1- There are uncompatible types of field in the subform; for example the use
of a BIGINT or some range for decimal values or the use of a real value.
Usually, adding a timestamp field will solve this problem.

2- You have trouble with the multi-steps feature of ADO because the query
for the subform is based on more than one table and is too complexe for the
multi-steps algorithme) or the queries for both the main form and the
subform share common fields from the same secondary table. Deactivating the
multi-step feature of ADP by setting the UniqueTable and the ResyncCommand
properties for either the main form, the subform or both of them should
solve this problem.

The best way to know what's going on would be to use the SQL-Server Profiler
to see what Access is trying to do. Moreover, understanding the optimistic
mecanism used by ADO for updating data and/or the multi-steps feature of ADO
shouldn't hurt you here.
 
Also, check for triggers on the relevant SQL Server tables(s). If there are
triggers, make sure that the first statement in each one is:

SET NOCOUNT ON;
 
Back
Top