Results 1 to 3 of 3

Thread: Can't update database [RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Location
    Wollongong. NSW. Australia
    Posts
    470

    Resolved Can't update database [RESOLVED]

    I have 5 networked computers. Eack one runs a separate version of my program with one central database.

    I occasionally have a problem with the database and receive an error messsage saying "Can't update. Database is locked". (or something similar).

    This happens on the .Update command. All recordsets use "adlockOptimistic". How important is the .update command??
    Last edited by Supremus; Sep 27th, 2007 at 04:30 AM.
    My reputation is in tatters. Don't bother trying to repair it.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Can't update database

    The .Update command is what actually writes the data to the database. The alternative is to .CancelUpdate

    That error generally means that you are leaving records in "edit" mode (from the point you set a value to the point you .Update) for too long - so other users cannot read the same records.

    As a general rule, you should make the actual time in edit mode as small as possible, preferably with the whole process being in a few lines of code without any breaks/pauses (so no MsgBox'es etc).

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Location
    Wollongong. NSW. Australia
    Posts
    470

    Re: Can't update database

    Thanks Si. My code is messy, so I'll tidy it up.
    My reputation is in tatters. Don't bother trying to repair it.

Posting Permissions

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



Click Here to Expand Forum to Full Width