none
Error 3260 - Could not update; currently locked by user '|2' on machine '|1'. RRS feed

  • Question

  • Split Access 2010 database, .mdb back end, record level locking enabled...users are occasionally seeing this error.  I'm not so concerned about how to troubleshoot 3260's but more about the user and machine name specified.  The error is usually a valid user and machine name but sometimes they are simply "user '|2' on machine '|1'."  Is there any significance to the user and machine name specified as a pipe symbol and number?  These are not valid user or machine names on our domain.

    -Bruce

    Wednesday, November 30, 2016 12:05 AM

All replies

  • Hi Bruce,

    I am not sure why it return this value, but I would suggest you try to capture the error and return the real user name and computer by below code:

    Sub Get_Environmental_Variable()
    Dim sHostName As String
    Dim sUserName As String
    ' Get Host Name / Get Computer Name
    sHostName = Environ$("computername")
    ' Get Current User Name
    sUserName = Environ$("username")
    'Get Current Domain
    sDomain = Environ$("USERDOMAIN")
    End Sub

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 30, 2016 3:21 AM
  • You are quoting the default string, which Access is supposed to use and replace the parameters |1 and |2 by their values. Apparently sometimes that does not happen properly. Why? Not sure. Maybe Access is in a bad state at that time and cannot retrieve the values. We shrug and move on :-)

    One way to move on is by writing a smart and centralized error handler, where you can include additional information such as username and machine name to the error output.


    -Tom. Microsoft Access MVP

    Wednesday, November 30, 2016 3:44 AM
  • Thanks Edward, but note that your code returns the current user and machine name receiving the error, not the user and machine name causing the error.

    -Bruce

    Wednesday, November 30, 2016 4:03 PM
  • Thanks Tom.  I thought that perhaps |1 and |2 might simply be parameter placeholders that Access failed to fill in but I was also concerned that perhaps these were actual values that might have some meaning.

    The error itself is actually captured and logged by a centralized error handler that logs the user and machine name of the recipient of the error among other things.  I'm not sure how one might capture the user and machine name of the cause of the error in the case of a locked record or page, especially if Access itself fails to capture that properly.

    Thanks!
    -Bruce


    Wednesday, November 30, 2016 4:20 PM
  • Hi Bruce,

    Sorry for this mistake. Did this error happened when the record is locked by specific user and computer?

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 1, 2016 7:06 AM
  • Edward, error 3260 indicates that one user is attempting to update a record which is already locked by a second user.  See:

    https://msdn.microsoft.com/en-us/library/bb210391(v=office.12).aspx

    The error text associated with error 3260 is "Could not update; currently locked by user <username> on machine <machinename>" where <username> and <machinename> are the name of the user and machine that originally locked the record.  In my case <username> is "|2" and <machinename> is "|1" which are not valid names.  I believe that "|1" and "|2" are simply parameter placeholders which Access failed to fill in properly.

    -Bruce

    Thursday, December 1, 2016 8:21 PM
  • If you are sure two users are not editing + updating the same record, then “sometimes” with small records, the two records reside on the SAME database page (a database is the smallest “frame” of data that the ACE data engine can read/write to the file). So a read + write will actually be "several" records, not just the  one record in question.

    It is “usually” not a problem, but with rather small records, then quite a few records can be on the SAME database page. As a result, if you are experiencing this issue (and are sure it not the same records being edited), then you could turn on ROW locking in Access. I don’t like this option since it causes a lot of file bloat (growth) during normal operation, but this setting can fix this error.

    This setting (if not already turned on) is

    File-options->client settings

    [ ] Open database by using record-level locking

    So you could try running with the above settings. This setting unfortunately is access/client based and does not travel with the application – so you have to set each workstation, or perhaps change + force this setting on start-up with some VBA code (but the setting only takes effect when  you re-start the application).

    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada


    Thursday, December 1, 2016 9:53 PM