Microsoft Knowledge Base Email Alertz

KBAlertz.com: You receive the following write conflict error when you try to update records in a linked SQL Server table:

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 278696 - Last Review: January 29, 2007 - Revision: 3.1

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

This article was previously published under Q278696
Advanced: Requires expert coding, interoperability, and multiuser skills.

For a Microsoft Access 2000 version of this article, see 280730  (http://kbalertz.com/Feedback.aspx?kbNumber=280730/EN-US/ ) .

SYMPTOMS

You receive the following write conflict error when you try to update records in a linked SQL Server table:
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.
You are then given the following options: Save Record, Copy to Clipboard, or Drop Changes.

CAUSE

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

RESOLUTION

To resolve this problem, do one of the following:
  • Using SQL Server, open the table in Design view, and assign a default value of 0 (that is, zero) on all bit fields.

    NOTE: With this option, you must update records entered before this change was made. See the next item for more information.

  • Using SQL Server, run an Update Transact-SQL statement against the table, and set all bit fields that have a value of Null to a new value of 0 or 1.
  • Using SQL Server, change the bit fields to some other data type, such as int or tinyint.
  • Using SQL Server, add a timestamp field to the table.

MORE INFORMATION

Steps to Reproduce Behavior

The following steps assume that you have an understanding of how to create tables in SQL Server, and that you are familiar with certain SQL Server tools such as Enterprise Manager.

Also assumed is that you are aware of how to create File, User, and System Data Source Names (DSN), and how to use a DSN to link a table to a Microsoft Access 97 database.
  1. In Microsoft SQL Server 7.0 or later, add a new table to the Pubs sample database, with the following table structure:

    Collapse this tableExpand this table
    Column NameData TypeLengthAllow Nulls
    fldIDint4<unchecked>
    fldBitbit1<checked>
    fldDescripvarchar50<checked>
  2. Make the following Column property assignments to the fldID:
       Identity: Yes
       Identity Seed: 1
       Identity Increment: 1
    					
  3. Set the fldID field as the primary key, and then close and save the table as Table1.
  4. Insert the following records into the Table1 table:

    Collapse this tableExpand this table
    fldIDfldBitfldDescrip
    11Record #1
    2<NULL>Record #2
    30Record #3
    41Record #4
  5. Close the table, and then create a User DSN that points to your SQL Server.
  6. Open any Access 97 database, and then link Table1 from the Pubs database into your database.
  7. Change the description of Record #1 to Record #0. Note that you can save your change.
  8. Try to change the description of Record #2 to Record #1. Note that you receive an error when you try to save your change.

APPLIES TO
  • Microsoft Access 97 Standard Edition
Keywords: 
kbprb KB278696
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Will Report As Irrelevant  
Written: 11/9/2004 2:40 PM
I read the 'cause' section and immediately understood that I would have spent hours barking up the wrong tree were it not for your help. Thank you! -W

Denis - denis.smith NOSPAM-AT-NOSPAM alcan.com Report As Irrelevant  
Written: 5/10/2005 9:57 AM
The info was right on the money. I had seen this problem years ago but forgot the fix until I used your web page. Thanks!

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please