ACCESS write conflict solution ???

H

hpesata

Hi!

I am using an ACCESS 2003 .ADP as a frontend for a MS SQL Server 2005
Express Edition
database.

I have a form, which has 4 subforms which all have the same table as
data-source,
the subforms are part of a tab-control.

I encountered the problem, that after modifying a field in one subform
and changing
to another, an ACCESS-message-box appears which tells me that another
user has
modified the data and I can just save/ignore/save to clipboard.

I use a timestamp column within my table and also dont have an BIT
fields
with possible NULL values.

how can I get rid of these ACCESS-message-box ?

any help with this is greatly appreciated,
thanx in advance!

regards,
Hans
 
S

Sylvain Lafontaine

You are exactly in the situation where you cannot use a timestamp field.
Remove it. If this doesn't correct the problem, make sure that you don't
have the same field in more than one subform not only as a bind control but
also in the record source of each subform.

If you don't find the offending field, use the SQL-Server Profiler to find
it.
 
H

hpesata

Hi !
You are exactly in the situation where you cannot use a timestamp field.
Remove it. If this doesn't correct the problem, make sure that you don't
have the same field in more than one subform not only as a bind control but
also in the record source of each subform.
If you don't find the offending field, use the SQL-Server Profiler to find it.

Thanx for your reply!

actually there are a few fields (state-flags) within my table which
are shared between the subforms.
the table acts as a temporary table to edit a specific record from
multiple records within another table
which is loaded/saved by my main-forms.logic.
The same problem occured when I didnt use a timestamp field.

Is there another possibility to share a table/fields between
subforms ?

regards,
Hans
 
S

Sylvain Lafontaine

No idea. You have to use the SQL-Server Profiler to see what is the exact
problem; a knowledge which is needed to find a solution.

As a possible solution, you could use local variables to share information
between subforms instead of using a backend table. You couls also duplicate
these fields and use a proper logic in the OnBeforeUpdate event of the form
to correct the situation about the optimistic locking. Another possibility
would be to use an unbound form. Another one would be to use a disconnected
recordset and make the update yourself; however, I don't know if ADP offers
support for the use of disconnected recordsets with bound forms.

Maybe using unbound controls for your state-flags will help; however, I
don't know much about your logic.
 
H

hpesata

Hi!

// As a possible solution, you could use local variables to share
information
// between subforms instead of using a backend table. You couls also
duplicate
// these fields and use a proper logic in the OnBeforeUpdate event of
the form
// to correct the situation about the optimistic locking. Another
possibility
// would be to use an unbound form. Another one would be to use a
disconnected
// recordset and make the update yourself; however, I don't know if
ADP offers
// support for the use of disconnected recordsets with bound forms.
// Maybe using unbound controls for your state-flags will help;
however, I
// don't know much about your logic.

thanx for Your reply!

I managed to use the tab-control without underlying forms and now all
my controls are on just one form and therefore can
access my table with no problems!

regards,
Hans
 

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

Similar Threads

Write Conflict with Subform 4
Call stored procedure in SSMS from Access 2016 doesn't work. 0
write conflict 4
Write Conflict 3
Write Conflict 7
write conflict 1
Write Conflict in Form Save 3
Write Conflict 1

Top