Board index » delphi » Could not Update; Currently Locked

Could not Update; Currently Locked


2004-07-22 06:31:16 PM
delphi44
Our application has started to receive the "Could not update; currently
locked" error message more regularly at one particular site. We are using D6
Pro and an Access 2000 database and connecting via ADO. Most of the time
everything is fine but then the error message displays. I have searched the
newsgroups but not found anything particularly relevent. There doesn't seem
to be a pattern and no one function appears to be the culprit. Does anyone
know what the error is caused by and how to avoid it? We regularly
compact/repair but it makes no difference. The customer is our largest in
terms of number of users - roughly 8 - and mdb size - roughly 40mb. The mdb
is located on a W2000 server.
Any help greatly appreciated
Thanks
Simon
 
 

Re:Could not Update; Currently Locked

Quote
Our application has started to receive the "Could not update; currently
locked" error message more regularly at one particular site. We are using D6
Pro and an Access 2000 database and connecting via ADO.
That sounds interesting. Can you tell me what kind of locking you
are using (optimistic / pessimistic), and if you are using TADODataSet ?
JA
 

Re:Could not Update; Currently Locked

It is an Access error 3218:
"This error occurs when a user tries to save a record that is locked by
another user.
To handle this error, program your solution to wait for a short period of
time, and then try to save the record again. Or, you can display a message
that explains the problem and give users the opportunity to try the
operation again."
"SYMPTOMS
The following message appears either when two users simultaneously try to
update or delete a similar object in a shared database or on a single-user
system if the system runs out of locks:
Couldn't update; currently locked by user '<user name>' on machine
'<machine name>'
CAUSE
On a multiuser system, a conflict exists with the SYSTEM.MDA file. By
design, Microsoft Access cannot simultaneously update the MsysObjects table
in the SYSTEM.MDA file for multiple users.
On a single-user system, there are not enough locks specified in the
AUTOEXEC.BAT file.
NOTE: The .MDA file should not have the same name as .mdb file unless they
are in different directories."
For more info, search for "Could not update; currently locked" (with quotes)
in MSDN.
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
Quote
Our application has started to receive the "Could not update; currently
locked" error message more regularly at one particular site. We are using
D6
Pro and an Access 2000 database and connecting via ADO. Most of the time
everything is fine but then the error message displays. I have searched the
newsgroups but not found anything particularly relevent. There doesn't
seem
to be a pattern and no one function appears to be the culprit. Does anyone
know what the error is caused by and how to avoid it? We regularly
compact/repair but it makes no difference. The customer is our largest in
terms of number of users - roughly 8 - and mdb size - roughly 40mb. The
mdb
is located on a W2000 server.

Any help greatly appreciated

Thanks
Simon


 

Re:Could not Update; Currently Locked

Jim
Thanks for the reply. We are using mainly TADOTable and TADOQuery with some
TADOCommand's although any part of the application seems vulnerable - there
isn't an obvious pattern. I have recently changed to optimstic locking
where previously set to pessimistic to try to avoid this problem although
most of them were already set to optimistic. I was told many years ago that
pessimistic locking doesn't work in the way you expect it to with ADO and
Delphi. The lock only applies whilst in the post method and not when the
dataset begin an edit. For that reason, we designed our own locking
mechanism by writing out a header before updating and checking if the header
exist before allowing an update to begin.
Thanks
Simon
"Jim Albertson" <XXXX@XXXXX.COM>writes
Quote
>Our application has started to receive the "Could not update; currently
>locked" error message more regularly at one particular site. We are
using D6
>Pro and an Access 2000 database and connecting via ADO.

That sounds interesting. Can you tell me what kind of locking you
are using (optimistic / pessimistic), and if you are using TADODataSet ?

JA


 

Re:Could not Update; Currently Locked

Vassiliev
Thanks for the reply. I had read this article so I kind of understand what
the problem is. My question is that its only just started to happen at one
site where the site has been running for a number of years with no real
problems of this nature. Is there a setting I can change, perhaps in
TADOConnection, that will automatically try again if it fails? The
application is very large so to try and implement the "try again" solution
would be a massive undertaking. I guess I am trying to find what might have
changed to cause this to happen.
Simon
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
Quote
It is an Access error 3218:

"This error occurs when a user tries to save a record that is locked by
another user.
To handle this error, program your solution to wait for a short period of
time, and then try to save the record again. Or, you can display a message
that explains the problem and give users the opportunity to try the
operation again."

"SYMPTOMS
The following message appears either when two users simultaneously try to
update or delete a similar object in a shared database or on a single-user
system if the system runs out of locks:


Couldn't update; currently locked by user '<user name>' on machine
'<machine name>'

CAUSE
On a multiuser system, a conflict exists with the SYSTEM.MDA file. By
design, Microsoft Access cannot simultaneously update the MsysObjects
table
in the SYSTEM.MDA file for multiple users.

On a single-user system, there are not enough locks specified in the
AUTOEXEC.BAT file.

NOTE: The .MDA file should not have the same name as .mdb file unless they
are in different directories."



For more info, search for "Could not update; currently locked" (with
quotes)
in MSDN.

//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
news:40ff97b2$XXXX@XXXXX.COM...
>Our application has started to receive the "Could not update; currently
>locked" error message more regularly at one particular site. We are
using
D6
>Pro and an Access 2000 database and connecting via ADO. Most of the time
>everything is fine but then the error message displays. I have searched
the
>newsgroups but not found anything particularly relevent. There doesn't
seem
>to be a pattern and no one function appears to be the culprit. Does
anyone
>know what the error is caused by and how to avoid it? We regularly
>compact/repair but it makes no difference. The customer is our largest
in
>terms of number of users - roughly 8 - and mdb size - roughly 40mb. The
mdb
>is located on a W2000 server.
>
>Any help greatly appreciated
>
>Thanks
>Simon
>
>


 

Re:Could not Update; Currently Locked

Not sure that this will help but you may try properties: "Jet OLEDB:Lock
Delay", "Jet OLEDB:Lock Retry". These properties should be set when
connection is open.
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
Quote
Vassiliev

Thanks for the reply. I had read this article so I kind of understand what
the problem is. My question is that its only just started to happen at one
site where the site has been running for a number of years with no real
problems of this nature. Is there a setting I can change, perhaps in
TADOConnection, that will automatically try again if it fails? The
application is very large so to try and implement the "try again" solution
would be a massive undertaking. I guess I am trying to find what might
have
changed to cause this to happen.

Simon

"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>It is an Access error 3218:
>
>"This error occurs when a user tries to save a record that is locked by
>another user.
>To handle this error, program your solution to wait for a short period
of
>time, and then try to save the record again. Or, you can display a
message
>that explains the problem and give users the opportunity to try the
>operation again."
>
>"SYMPTOMS
>The following message appears either when two users simultaneously try
to
>update or delete a similar object in a shared database or on a
single-user
>system if the system runs out of locks:
>
>
>Couldn't update; currently locked by user '<user name>' on machine
>'<machine name>'
>
>CAUSE...
>On a multiuser system, a conflict exists with the SYSTEM.MDA file. By
>design, Microsoft Access cannot simultaneously update the MsysObjects
table
>in the SYSTEM.MDA file for multiple users.
>
>On a single-user system, there are not enough locks specified in the
>AUTOEXEC.BAT file.
>
>NOTE: The .MDA file should not have the same name as .mdb file unless
they
>are in different directories."
>
>
>
>For more info, search for "Could not update; currently locked" (with
quotes)
>in MSDN.
>
>//------------------------------------------
>Regards,
>Vassiliev V. V.
>www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>ADO.Net
>www.oledbdirect.com - The fastest way to access MS SQL Server,
>MS Jet (Access) and Interbase (through OLEDB)
>
>
>"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
>news:40ff97b2$XXXX@XXXXX.COM...
>>Our application has started to receive the "Could not update;
currently
>>locked" error message more regularly at one particular site. We are
using
>D6
>>Pro and an Access 2000 database and connecting via ADO. Most of the
time
>>everything is fine but then the error message displays. I have searched
the
>>newsgroups but not found anything particularly relevent. There
doesn't
>seem
>>to be a pattern and no one function appears to be the culprit. Does
anyone
>>know what the error is caused by and how to avoid it? We regularly
>>compact/repair but it makes no difference. The customer is our largest
in
>>terms of number of users - roughly 8 - and mdb size - roughly 40mb.
The
>mdb
>>is located on a W2000 server.
>>
>>Any help greatly appreciated
>>
>>Thanks
>>Simon
>>
>>
>
>


 

Re:Could not Update; Currently Locked

Vassiliev
If I try and pass these parameters in the connection string I get an error -
"Could not find installable ISAM"
Simon
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
Quote
Not sure that this will help but you may try properties: "Jet OLEDB:Lock
Delay", "Jet OLEDB:Lock Retry". These properties should be set when
connection is open.

//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
news:4100c2eb$XXXX@XXXXX.COM...
>Vassiliev
>
>Thanks for the reply. I had read this article so I kind of understand
what
>the problem is. My question is that its only just started to happen at
one
>site where the site has been running for a number of years with no real
>problems of this nature. Is there a setting I can change, perhaps in
>TADOConnection, that will automatically try again if it fails? The
>application is very large so to try and implement the "try again"
solution
>would be a massive undertaking. I guess I am trying to find what might
have
>changed to cause this to happen.
>
>Simon
>
>"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
>news:XXXX@XXXXX.COM...
>>It is an Access error 3218:
>>
>>"This error occurs when a user tries to save a record that is locked
by
>>another user.
>>To handle this error, program your solution to wait for a short period
of
>>time, and then try to save the record again. Or, you can display a
message
>>that explains the problem and give users the opportunity to try the
>>operation again."
>>
>>"SYMPTOMS
>>The following message appears either when two users simultaneously try
to
>>update or delete a similar object in a shared database or on a
single-user
>>system if the system runs out of locks:
>>
>>
>>Couldn't update; currently locked by user '<user name>' on machine
>>'<machine name>'
>>
>>CAUSE...
>>On a multiuser system, a conflict exists with the SYSTEM.MDA file. By
>>design, Microsoft Access cannot simultaneously update the MsysObjects
>table
>>in the SYSTEM.MDA file for multiple users.
>>
>>On a single-user system, there are not enough locks specified in the
>>AUTOEXEC.BAT file.
>>
>>NOTE: The .MDA file should not have the same name as .mdb file unless
they
>>are in different directories."
>>
>>
>>
>>For more info, search for "Could not update; currently locked" (with
>quotes)
>>in MSDN.
>>
>>//------------------------------------------
>>Regards,
>>Vassiliev V. V.
>>www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>>ADO.Net
>>www.oledbdirect.com - The fastest way to access MS SQL Server,
>>MS Jet (Access) and Interbase (through OLEDB)
>>
>>
>>"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
>>news:40ff97b2$XXXX@XXXXX.COM...
>>>Our application has started to receive the "Could not update;
currently
>>>locked" error message more regularly at one particular site. We are
>using
>>D6
>>>Pro and an Access 2000 database and connecting via ADO. Most of the
time
>>>everything is fine but then the error message displays. I've
searched
>the
>>>newsgroups but not found anything particularly relevent. There
doesn't
>>seem
>>>to be a pattern and no one function appears to be the culprit. Does
>anyone
>>>know what the error is caused by and how to avoid it? We regularly
>>>compact/repair but it makes no difference. The customer is our
largest
>in
>>>terms of number of users - roughly 8 - and mdb size - roughly 40mb.
The
>>mdb
>>>is located on a W2000 server.
>>>
>>>Any help greatly appreciated
>>>
>>>Thanks
>>>Simon
>>>
>>>
>>
>>
>
>


 

Re:Could not Update; Currently Locked

Connection string should not contain these properties:
ADOConnection1.ConnectionString := '...';
ADOConnection1.Connected := True;
ADOConnection1.Properties['Jet OLEDB:Lock Delay'].Value := 10;
ADOConnection1.Properties['Jet OLEDB:Lock Retry'].Value := 10;
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
Quote
Vassiliev

If I try and pass these parameters in the connection string I get an
error -
"Could not find installable ISAM"

Simon

"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
news:4100db55$XXXX@XXXXX.COM...
>Not sure that this will help but you may try properties: "Jet OLEDB:Lock
>Delay", "Jet OLEDB:Lock Retry". These properties should be set when
>connection is open.
>
>//------------------------------------------
>Regards,
>Vassiliev V. V.
>www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>ADO.Net
>www.oledbdirect.com - The fastest way to access MS SQL Server,
>MS Jet (Access) and Interbase (through OLEDB)
>
>"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
>news:4100c2eb$XXXX@XXXXX.COM...
>>Vassiliev
>>
>>Thanks for the reply. I had read this article so I kind of understand
what
>>the problem is. My question is that its only just started to happen at
one
>>site where the site has been running for a number of years with no
real
>>problems of this nature. Is there a setting I can change, perhaps in
>>TADOConnection, that will automatically try again if it fails? The
>>application is very large so to try and implement the "try again"
solution
>>would be a massive undertaking. I guess I am trying to find what might
>have
>>changed to cause this to happen.
>>
>>Simon
>>
>>"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
>>news:XXXX@XXXXX.COM...
>>>It is an Access error 3218:
>>>
>>>"This error occurs when a user tries to save a record that is locked
by
>>>another user.
>>>To handle this error, program your solution to wait for a short
period
>of
>>>time, and then try to save the record again. Or, you can display a
>message
>>>that explains the problem and give users the opportunity to try the
>>>operation again."
>>>
>>>"SYMPTOMS
>>>The following message appears either when two users simultaneously
try
>to
>>>update or delete a similar object in a shared database or on a
>single-user
>>>system if the system runs out of locks:
>>>
>>>
>>>Couldn't update; currently locked by user '<user name>' on
machine
>>>'<machine name>'
>>>
>>>CAUSE...
>>>On a multiuser system, a conflict exists with the SYSTEM.MDA file.
By
>>>design, Microsoft Access cannot simultaneously update the
MsysObjects
>>table
>>>in the SYSTEM.MDA file for multiple users.
>>>
>>>On a single-user system, there are not enough locks specified in the
>>>AUTOEXEC.BAT file.
>>>
>>>NOTE: The .MDA file should not have the same name as .mdb file
unless
>they
>>>are in different directories."
>>>
>>>
>>>
>>>For more info, search for "Could not update; currently locked" (with
>>quotes)
>>>in MSDN.
>>>
>>>//------------------------------------------
>>>Regards,
>>>Vassiliev V. V.
>>>www.managed-vcl.com - using .Net objects in Delphi for Win32
+
>>>ADO.Net
>>>www.oledbdirect.com - The fastest way to access MS SQL
Server,
>>>MS Jet (Access) and Interbase (through OLEDB)
>>>
>>>
>>>"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях
следующе?
>>>news:40ff97b2$XXXX@XXXXX.COM...
>>>>Our application has started to receive the "Could not update;
>currently
>>>>locked" error message more regularly at one particular site. We
are
>>using
>>>D6
>>>>Pro and an Access 2000 database and connecting via ADO. Most of
the
>time
>>>>everything is fine but then the error message displays. I've
searched
>>the
>>>>newsgroups but not found anything particularly relevent. There
>doesn't
>>>seem
>>>>to be a pattern and no one function appears to be the culprit.
Does
>>anyone
>>>>know what the error is caused by and how to avoid it? We regularly
>>>>compact/repair but it makes no difference. The customer is our
largest
>>in
>>>>terms of number of users - roughly 8 - and mdb size - roughly
40mb.
>The
>>>mdb
>>>>is located on a W2000 server.
>>>>
>>>>Any help greatly appreciated
>>>>
>>>>Thanks
>>>>Simon
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:Could not Update; Currently Locked

Vassiliev
I've finally managed to try this suggestion on the network with the problem
but unfortunately it made no difference. We are still getting exactly the
same error. Is there anhting else I could try as the customer is starting to
get very frustrated with the number of times it is happeneing.
Thanks
Simon
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
Quote
Connection string should not contain these properties:

ADOConnection1.ConnectionString := '...';
ADOConnection1.Connected := True;
ADOConnection1.Properties['Jet OLEDB:Lock Delay'].Value := 10;
ADOConnection1.Properties['Jet OLEDB:Lock Retry'].Value := 10;

//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
news:XXXX@XXXXX.COM...
>Vassiliev
>
>If I try and pass these parameters in the connection string I get an
error -
>"Could not find installable ISAM"
>
>Simon
>
>"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
>news:4100db55$XXXX@XXXXX.COM...
>>Not sure that this will help but you may try properties: "Jet
OLEDB:Lock
>>Delay", "Jet OLEDB:Lock Retry". These properties should be set when
>>connection is open.
>>
>>//------------------------------------------
>>Regards,
>>Vassiliev V. V.
>>www.managed-vcl.com - using .Net objects in Delphi for Win32 +
>>ADO.Net
>>www.oledbdirect.com - The fastest way to access MS SQL Server,
>>MS Jet (Access) and Interbase (through OLEDB)
>>
>>"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях следующе?
>>news:4100c2eb$XXXX@XXXXX.COM...
>>>Vassiliev
>>>
>>>Thanks for the reply. I had read this article so I kind of
understand
>what
>>>the problem is. My question is that its only just started to happen
at
>one
>>>site where the site has been running for a number of years with no
real
>>>problems of this nature. Is there a setting I can change, perhaps
in
>>>TADOConnection, that will automatically try again if it fails? The
>>>application is very large so to try and implement the "try again"
>solution
>>>would be a massive undertaking. I guess I am trying to find what
might
>>have
>>>changed to cause this to happen.
>>>
>>>Simon
>>>
>>>"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>wrote in
message
>>>news:XXXX@XXXXX.COM...
>>>>It is an Access error 3218:
>>>>
>>>>"This error occurs when a user tries to save a record that is
locked
>by
>>>>another user.
>>>>To handle this error, program your solution to wait for a short
period
>>of
>>>>time, and then try to save the record again. Or, you can display a
>>message
>>>>that explains the problem and give users the opportunity to try
the
>>>>operation again."
>>>>
>>>>"SYMPTOMS
>>>>The following message appears either when two users simultaneously
try
>>to
>>>>update or delete a similar object in a shared database or on a
>>single-user
>>>>system if the system runs out of locks:
>>>>
>>>>
>>>>Couldn't update; currently locked by user '<user name>' on
machine
>>>>'<machine name>'
>>>>
>>>>CAUSE...
>>>>On a multiuser system, a conflict exists with the SYSTEM.MDA file.
By
>>>>design, Microsoft Access cannot simultaneously update the
MsysObjects
>>>table
>>>>in the SYSTEM.MDA file for multiple users.
>>>>
>>>>On a single-user system, there are not enough locks specified in
the
>>>>AUTOEXEC.BAT file.
>>>>
>>>>NOTE: The .MDA file should not have the same name as .mdb file
unless
>>they
>>>>are in different directories."
>>>>
>>>>
>>>>
>>>>For more info, search for "Could not update; currently locked"
(with
>>>quotes)
>>>>in MSDN.
>>>>
>>>>//------------------------------------------
>>>>Regards,
>>>>Vassiliev V. V.
>>>>www.managed-vcl.com - using .Net objects in Delphi for
Win32
+
>>>>ADO.Net
>>>>www.oledbdirect.com - The fastest way to access MS SQL
Server,
>>>>MS Jet (Access) and Interbase (through OLEDB)
>>>>
>>>>
>>>>"Simon Bowyer" <nospam@nospam>сообщи?сообщила ?новостях
следующе?
>>>>news:40ff97b2$XXXX@XXXXX.COM...
>>>>>Our application has started to receive the "Could not update;
>>currently
>>>>>locked" error message more regularly at one particular site. We
are
>>>using
>>>>D6
>>>>>Pro and an Access 2000 database and connecting via ADO. Most of
the
>>time
>>>>>everything is fine but then the error message displays. I've
>searched
>>>the
>>>>>newsgroups but not found anything particularly relevent. There
>>doesn't
>>>>seem
>>>>>to be a pattern and no one function appears to be the culprit.
Does
>>>anyone
>>>>>know what the error is caused by and how to avoid it? We
regularly
>>>>>compact/repair but it makes no difference. The customer is our
>largest
>>>in
>>>>>terms of number of users - roughly 8 - and mdb size - roughly
40mb.
>>The
>>>>mdb
>>>>>is located on a W2000 server.
>>>>>
>>>>>Any help greatly appreciated
>>>>>
>>>>>Thanks
>>>>>Simon
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:Could not Update; Currently Locked

Just a sugeestion, I don't know if it will work, but
might be worth a try:
The shared folder on Windows 2000: check the
'caching' options.
JA
 

Re:Could not Update; Currently Locked

Jim
Thanks for your response. It is set to Manual caching for documents. What
should it be set to? The folder contains a number of different files types
including the exe, the mdb, report fiels and various word docuemtns and
templates used by the application. The help talks about availability off
line but none of these files should ever be accessed in any other way other
than directly on the server - especially the mdb for obvious reasons!!
Thanks
Simon
"Jim Albertson" <XXXX@XXXXX.COM>writes
Quote
Just a sugeestion, I don't know if it will work, but
might be worth a try:

The shared folder on Windows 2000: check the
'caching' options.

JA