Could not update; currently locked by user - VC + Access + Windows XP
-
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
-
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
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
-
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
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
-
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
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