+ Reply to Thread
Results 1 to 4 of 4

error message "Could not update; currently locked"

  1. #1
    Forum Contributor
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    154

    error message "Could not update; currently locked"

    Hello,

    I have a table in my database which is a change log.
    So when users make a change it records the previous and new values.


    It's a simple "INSERT" statement run by the .Execute method on the ADO connection.


    Most of the time there is no problem, but every now and then this fails with the error "Could not update; Currently locked".
    The issue affects all users and I can't really work out why this happens, who's locked it or what I'm not/doing which causes it or how to fix it?
    Last edited by Mingeita; 12-07-2022 at 06:13 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: error message "Could not update; currently locked"

    It may be possible that someone closed their session erroneously and locked the database. Suggest have everyone log out. Go the the folder where the DB is housed and see if there is .laccbd file still open with the same DB name. If so, delete it and see if this solves your issuse.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    154

    Re: error message "Could not update; currently locked"

    Thank you,

    everyone logging out fixed it, but it had to be everyone.
    I added an error trap so that it records the sql statements if it happens again. At least then I can run those later and update the log correctly.

    I also changed from .execute to opening a recordset to do the insert. Not sure if that will make any difference. It hasn't happened since anyway.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: error message "Could not update; currently locked"

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] open file that is "locked for editing" - pause code and retry, instead of alert message?
    By Arnold Layne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2019, 07:57 AM
  2. [SOLVED] Persistent "Invalid Property Value" Message Upon Clicking of locked Comboboxes
    By Jenn68 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2019, 10:04 AM
  3. MSoffice Outlook 2003 message to be saved in C dir with the file name "From" "Sent" "Sub"
    By shailendra0509 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2012, 01:32 AM
  4. I want "locked for editing" message
    By Dan Williams in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2006, 07:15 PM
  5. Replies: 3
    Last Post: 07-18-2006, 12:30 PM
  6. Prevent "XYZ.doc is locked for editing" message
    By Greg Wilson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2005, 05:05 AM
  7. Not getting "Locked for Editing" message
    By grinnineddies in forum Excel General
    Replies: 0
    Last Post: 06-17-2005, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1