Could not update; currently locked. (1 Viewer)

ezfriend

Registered User.
Local time
Yesterday, 19:03
Joined
Nov 24, 2006
Messages
242
Issue:

Run-time error '-2147352567 (80020009)'
Could not update; currently locked.
------------------------------------------------------------

I have a simple database that are being used by 5-10 users. (FE (mde)/BE)

Very often, users get the error above and I am not getting why this error keep popping up. I read numerous suggestions from this forum and other forum. I also checked on the [Record Locks] property on the forms and they are set to "No Locks".

These records are on a sub-form. (Main-> Sub form is a one-to-many relationship). Error occur on both Main and Sub form, but not in any particular order.

Please give me suggestions if you can.

Thanks in advance.

EZ
 
Last edited:

boblarson

Smeghead
Local time
Yesterday, 19:03
Joined
Jan 12, 2001
Messages
32,059
When you say you have FE/BE, does that mean that every user has a copy of the FE on their computer?

Also, do you have any memo fields in the tables in question?
 

ezfriend

Registered User.
Local time
Yesterday, 19:03
Joined
Nov 24, 2006
Messages
242
That is correct. I have the FE on all of the users' desktops, the BE is on a network drive.

And Yes, I do have one memo field on the Main form.

Would that memo field the the reason for causing this lock-up?
 

boblarson

Smeghead
Local time
Yesterday, 19:03
Joined
Jan 12, 2001
Messages
32,059
Check for any records with strange characters in the memo fields. It could be a corrupt record causing you problems. Also, with a memo field I think you may want to set it to lock at the record level. I have had problems with a client's db corrupting prior to us setting the record lock to lock at record level and haven't had a problem since.
 

ezfriend

Registered User.
Local time
Yesterday, 19:03
Joined
Nov 24, 2006
Messages
242
Thanks, Boblarson.

The characters seem to be normal. I'll set it to lock at record level and see what happen.

It also appear that the text in the Note field are less than 255 characters so I'll change it to a text field and see if that help as well.

I'll will update the forum later today.
 

DCrake

Remembered
Local time
Today, 02:03
Joined
Jun 8, 2005
Messages
8,632
Now I have a similar setup with the BE on a server and the app on the PC. The Pc is performing an update via ADODB/DAO recordsets. I also get the error. This is down to the code being to efficient for the network it cannot relase the cashing memory quick enough to continue without falling over. No doubt if you choose debug then pressed f5 it would resume for a while and come up with the same error repeating F5 seems to work. This is because the pause in the code allows the caching to be released. I had to actually slow down my code to compensate for the network traffic. Other than that the user copied down the be to the pc and ran the update locally and copied the data back to the server.

David
 

ezfriend

Registered User.
Local time
Yesterday, 19:03
Joined
Nov 24, 2006
Messages
242
Good point, DCrack.

That could very well be my issue. After I modified my code based on Boblarson's suggestion, I still get the same error.

Since our server (where BE is stored) is collocated, we do notice the performance delay.

Per your suggestion above, how would I go about slowing down my code?

Thanks.

EZ
 

DCrake

Remembered
Local time
Today, 02:03
Joined
Jun 8, 2005
Messages
8,632
Examine you code and see where the error is being picked up. This will normally be in a loop of some kind.

Lets say you are updating 10,000 records in a Do Until .. Loop what you can do is to count the loops and say every time it reaches 1000 then wait for 2 seconds using a timer control. Then reset the counter back to 0.

You may need to play around with the timings and intervals, oh, and don't forget to include a DoEvents after each Pause.

David
 

ezfriend

Registered User.
Local time
Yesterday, 19:03
Joined
Nov 24, 2006
Messages
242
The record locks some how links to the delays between the person's pc and the server.

In addition, since there will be 10-40 people using the application simultaneously, by using classes, I was able to establish connections to the BE, perform what needs to be done, and then close the connections, leaving the database with less active connections. This appears to improve the performance greatly and no longer see record lock-up.

Thank you very much for your inputs on this topic.

Have a happy Thanks Giving.

EZfriend.
 
Last edited:

Users who are viewing this thread

Top Bottom