Write Conflict in Form Save

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?
 
S

Sylvain Lafontaine

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.
 
B

Baz

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;
 

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