Results 1 to 6 of 6
  1. #1
    Milad Roohi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    5

    Unhappy Write conflict error in access

    Hi, have nice day
    I'm new in access and have problem with write conflict error, I use this code for update my table :

    cmd = "UPDATE TblStudent SET Student_Image = '" + fileName + "' WHERE Student_ID_ = " + Student_ID
    DoCmd.RunSQL cmd

    But everytime i face with this error :

    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.

    Then, you can click one of the following three buttons:


    • Save Record
    • Copy To Clipboard
    • Drop Changes

    what can i do to not see this and run my sql code correctly??

    thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Is StudentImage field a text field?

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Is your SQL command updating the same record that you are currently looking at on a form? If so, that is what is causing the error. To update a record you are looking at in a form, just update the controls on the form.

  4. #4
    Milad Roohi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    5
    yse it's name of a student image file

  5. #5
    Milad Roohi is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2016
    Posts
    5
    Quote Originally Posted by ranman256 View Post
    Is StudentImage field a text field?
    yse it's name of a student image file

  6. #6
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    You don't assign a file name to an image field.
    you must use Loadimage.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-23-2016, 11:54 AM
  2. write conflict error
    By nyneave in forum Security
    Replies: 1
    Last Post: 10-13-2012, 06:17 PM
  3. write conflict error
    By karuppasamy in forum Access
    Replies: 1
    Last Post: 06-07-2011, 12:23 PM
  4. Write Conflict Error Message
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 07-27-2010, 09:57 AM
  5. Write Conflict Error
    By botts121 in forum Access
    Replies: 5
    Last Post: 09-25-2009, 12:11 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums