Hi,
when I tried to update one record of table (in host) i faced this error :
Could not save; currently locked by another user
I tried again and again but faced the same problem (but i could insert a new row and update it at the same table).
then i cleared my browser history and error gone.
I found this error occures when two user trying to access the same table at the same time, but what is relation between history of browser and this error?
I use Transaction when I need to do more than one Insert, update, delete at the same time. here I do one update so I dont think transaction is needed here.
and I think second link is usful when we use access database in local not host.
Member
102 Points
247 Posts
Could not save; currently locked by another user
Apr 16, 2014 06:56 AM|uid571490|LINK
Hi,
when I tried to update one record of table (in host) i faced this error :
Could not save; currently locked by another user
I tried again and again but faced the same problem (but i could insert a new row and update it at the same table).
then i cleared my browser history and error gone.
I found this error occures when two user trying to access the same table at the same time, but what is relation between history of browser and this error?
what was the problem????
All-Star
25756 Points
7014 Posts
Re: Could not save; currently locked by another user
Apr 16, 2014 07:15 AM|hans_v|LINK
Most likely, you're not closing and disposing the connection properly. Use the syntax in this article:
http://www.mikesdotnetting.com/Article/26/Parameter-Queries-in-ASP.NET-with-MS-Access
If this doesn't help. please show us your code?
Member
102 Points
247 Posts
Re: Could not save; currently locked by another user
Apr 16, 2014 09:39 AM|uid571490|LINK
Thanks
as I said by clearing the history error gone, so I can't test again until face that situation again!
by the way this is codes
below code is in Services Class
at least I found it can be related to coding. thanks a lot!
All-Star
16806 Points
2777 Posts
Re: Could not save; currently locked by another user
Apr 16, 2014 11:00 PM|Kevin Shen - MSFT|LINK
Hi Bahare Feizi,
About your code,It seems that you update or insert data using ExecuteNoneQuery Method
But you didn ‘t open transaction and didn’t commit changes to the database .
Please try the code below:
More details about Transaction,please refer to link below:
http://msdn.microsoft.com/en-us/library/93ehy0z8(v=vs.110).aspx
If it doesn’t work ,please refer to the link below, try to use the methods provide:
http://support.microsoft.com/kb/918578
Hope it can help you.
Best Regards,
Kevin Shen.
Member
102 Points
247 Posts
Re: Could not save; currently locked by another user
Apr 17, 2014 01:04 AM|uid571490|LINK
Thanks,
I use Transaction when I need to do more than one Insert, update, delete at the same time. here I do one update so I dont think transaction is needed here.
and I think second link is usful when we use access database in local not host.