Error 3188 -- Couldn't update. Currently locked by another session on this machine

lmcc007

Registered User.
Local time
Yesterday, 19:15
Joined
Nov 10, 2007
Messages
635
Using Access 2007

I have an EventNote table with three fields:

1) EventNoteID - AutoNumber
2) EventID - Number
3) EventNoteData – Memo

The EventDetail form has a button to click to add notes, which will open to EventNoteData field (in Popup, Modal). I found out if you have more than one form opened or are adding data over 2K it will not save and you get the Error 3188. And, when you are adding a few lines of text, no problem.

I’ve been searching this past week and found out this is a known problem with Memo fields.

Has anyone by now found a solution?
 
One way is to keep your memo field in a separate table. That tends to help.
 
This sounds vaguely familiar.

First, if you have two forms, that could be many things but most likely you need to update your table using optimistic vs pessimistic locks.

Second, the problem with memo fields that gets too long... Is there a chance that you have a trap declared in this event logging routing that would itself attempt to log a trap event in the same table? If so, what is that second trap's code from before you attempt the second log event?

It smells vaguely like you are stepping on yourself by logging from a logging routine. By default, Access event routines are NOT guaranteed to be re-entrant. They CAN be re-entrant but only if you program carefully to not have side-effects. Unfortunately, with a logging routine that points to a single event table, that is inherently not re-entrant.

That is a possible source of you stepping on yourself, which is the most common case of single-user events leading to blocked records.
 
Glad you mentioned the memo field concept. It might be handy for my issue too.

While on the subject....
Back in Access 97 Row Level Locking was not available.
So, if someone was "near" your data it could cause these kinds of problems. Seem to remember that 2K was the minimal locking size. Sometimes, it was recommended to pad a record out to 1K to reduce the odds of collisions.

Is the Row Record Locking option really at a row now?
Any real-world words of wisdom for a multi-user environment would be appreciated.
 
This sounds vaguely familiar.

First, if you have two forms, that could be many things but most likely you need to update your table using optimistic vs pessimistic locks.

Second, the problem with memo fields that gets too long... Is there a chance that you have a trap declared in this event logging routing that would itself attempt to log a trap event in the same table? If so, what is that second trap's code from before you attempt the second log event?

It smells vaguely like you are stepping on yourself by logging from a logging routine. By default, Access event routines are NOT guaranteed to be re-entrant. They CAN be re-entrant but only if you program carefully to not have side-effects. Unfortunately, with a logging routine that points to a single event table, that is inherently not re-entrant.

That is a possible source of you stepping on yourself, which is the most common case of single-user events leading to blocked records.

I am not understanding what you mean by "...logging from a logging routine..."

Basically, in my database my EventNote memo field is in a separate table—that is, EventNote table has three fields:

1) EventNoteID – AutoNumber (primary key)

2) EventID – Number (event related to)

3) EventNoteData – Memo (note field)

From that table I created a form called fdlgEventNote. This form is Pop-up and Modal. This form will be called from the EventDetail form.

EventDetail form has a command button you can click to add notes, which will open to EventNoteData.

1. I tried to update a text field with more than 2K characters.

2. In records with shorter text I can update the field.

3. I can add, revised, or delete the long text field if only one form is open.

4. When two or more forms are opened, I get the Error 3188 when I try to edit, delete, or add.
 

Users who are viewing this thread

Back
Top Bottom