"Currently Locked by another session" Error

Leesha
BronzeLounger
Posts: 1487
Joined: 05 Feb 2010, 22:25

"Currently Locked by another session" Error

Post by Leesha »

Hi,
I have a query that can contain anywhere from 1-110's of email addresses. The user has the ability to delete/edit the ones they don't want added to a batch email, or that need to be corrected. They are stored in a temporary table so this doesn't affect where the addresses are permanently stored. They are getting errors on random rows that states "could not update due to being locked by another session on the machine". I can't figure out what is locking them. Is there code that will unlock them?
Thanks,
Leesha

User avatar
HansV
Administrator
Posts: 78449
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: "Currently Locked by another session" Error

Post by HansV »

Do you keep a recordset on that table open?
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1487
Joined: 05 Feb 2010, 22:25

Re: "Currently Locked by another session" Error

Post by Leesha »

I honestly don't know. Also, this wasn't happening before that I know of. It seems to be affecting the first 18 rows of the query. frmOutputEmailBatch is bound to qryEmailSent. The user can open the query from frmOututEmailBatch to make corrections or deletions to the records in qryEmailSent. It seems to be affecting the first 18-20 rows of the query. The rest can be edited or deleted.
Leesha

User avatar
HansV
Administrator
Posts: 78449
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: "Currently Locked by another session" Error

Post by HansV »

Do you mean that the user opens qryEmailSent while the form qryEmailSent which is bound to qryEmailSent is open? That might cause the conflict.
Best wishes,
Hans

Leesha
BronzeLounger
Posts: 1487
Joined: 05 Feb 2010, 22:25

Re: "Currently Locked by another session" Error

Post by Leesha »

I tried it with a different query than the one the form is bound to but still get the same error.

Leesha
BronzeLounger
Posts: 1487
Joined: 05 Feb 2010, 22:25

Re: "Currently Locked by another session" Error

Post by Leesha »

Ok so I decided to "think like Hans" and I believe I found it!! The form property Record Locks was set to edited records. I put it back to No Locks and I appear to be ok.

User avatar
HansV
Administrator
Posts: 78449
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: "Currently Locked by another session" Error

Post by HansV »

Great! :thumbup:
Best wishes,
Hans