Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Could not update; currently locked by user - VC + Access + Windows XP

Could not update; currently locked by user - VC + Access + Windows XP

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpannouncementworkspace
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SelvaKr
    wrote on last edited by
    #1

    Hi, I am having the below environment. My application is running in machine A. It has an access database in the local machine and a connection will be established when the application starts and will end when the application exits. I am using CDatabase to connect to the DB. I need to delete a record presents in the machine A database from machine B. To do this, i am creating a connection from machine B to machine A's database and executing the delete query. During the SQL execution, I am getting an error 'Could not update; currently locked by user admin...'. The frequency of the error is often but not at all tries. I welcome your ideas in resolving this issue. Thanks in advance.

    Selva

    D 1 Reply Last reply
    0
    • S SelvaKr

      Hi, I am having the below environment. My application is running in machine A. It has an access database in the local machine and a connection will be established when the application starts and will end when the application exits. I am using CDatabase to connect to the DB. I need to delete a record presents in the machine A database from machine B. To do this, i am creating a connection from machine B to machine A's database and executing the delete query. During the SQL execution, I am getting an error 'Could not update; currently locked by user admin...'. The frequency of the error is often but not at all tries. I welcome your ideas in resolving this issue. Thanks in advance.

      Selva

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      So does machine A have any part of the database open? When this error pops up, have you checked to see what process may have a file open?

      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      S 1 Reply Last reply
      0
      • D David Crow

        So does machine A have any part of the database open? When this error pops up, have you checked to see what process may have a file open?

        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        S Offline
        S Offline
        SelvaKr
        wrote on last edited by
        #3

        Hi, Yes. From machine A will always be holding a connection with the database until the application exits. But Access supports shared access of DB. isn't it? Moreover i am not getting the error at all tries. Only once in 3 or 4 times. Is there any way of avoiding the locking of the records? i.e allowing two users to update the record at the same time.. I have got something from the web, where they ask to wait for some time and do the process again. But in my case even that doesn't workout. Please see the link below. http://www.dbforums.com/archive/index.php/t-525401.html[^] Thanks

        Selva

        D 1 Reply Last reply
        0
        • S SelvaKr

          Hi, Yes. From machine A will always be holding a connection with the database until the application exits. But Access supports shared access of DB. isn't it? Moreover i am not getting the error at all tries. Only once in 3 or 4 times. Is there any way of avoiding the locking of the records? i.e allowing two users to update the record at the same time.. I have got something from the web, where they ask to wait for some time and do the process again. But in my case even that doesn't workout. Please see the link below. http://www.dbforums.com/archive/index.php/t-525401.html[^] Thanks

          Selva

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          SelvaKr wrote:

          But Access supports shared access of DB. isn't it?

          As far as I know it does. But you first need to determine what process has the file(s) open such that machine B cannot update them. Is it your application running on machine A, or some other application?

          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups