Write conflict

M

mad

Hi everybody!!
I'm working on a project, we are using SQLServer and
access as front-end interface to the db.The problem is
when i try to update or insert a new record on a form.
Access signals a write conflict error, saying that another
user has altered the record, giving me three options. (
Save change, drop changes, save to clipboard). I guess the
error is because i'm setting some fields in the form with
code, and some other trough the form. Maybe access
consider them as 2 different users.
I'm stuck with an important project because of this and we
are running out of time, so please, if someone knows the
solution to this problem, i will appriciate the help.

Tanks in advance
 
A

Albert D. Kallal

Anytime you launch some code, or run some code that can/will update the same
records as the form, then you better write out that form to disk first.

Do a "me.Refresh" or a "me.Dirty = False"

The above will thus force the current record to disk, and thus other
code/processes can then safely update the code without a conflict.

You also REALLY need to make sure that forms has a timestamp fields exposed
from sql server, as that is used to determine when/if to update a record.
ms-access can get real confused if you don't supply this info. So, you don't
need those as fields, but you want to expose it. This is especially so for
sub-forms...they hardly work at all without a timestamp field.

There is also the issue of floating point fields being set to null.

So, check out the following KB article also:

Write Conflict Error When You Try to Update Records in a Linked SQL Server
Table

CAUSE
Access is creating Null bit fields, which causes a type mismatch.

http://support.microsoft.com/?id=280730
 

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