Quantcast
Channel: MsAccess error 3046: "could not save; currently locked by another user"
Viewing all articles
Browse latest Browse all 28

MsAccess error 3046: "could not save; currently locked by another user"

$
0
0

Hi,

Since November 2019 I have the same problem even when I am the only active user. At my job we have the same MS Access application as front on every machine with MS Access databases as back end on server. One solution I found is change the VBA code as follow:

On Error GoTo Err_Handler

Do

    Set rst=dbData.OpenRecordset("SELECT * FROM Table WHERE Condition") 'this causing the error!!

...

...

...

Loop Until .EOF

Exit Sub

Err_Handler:

If Err.Number= 3046 And i < 100 Then

  Err.Clear

  Resume ' (yes, Resume to the same line that cause the error, next time will work)

  i = i +1

Else

...

End If

The problem still remain when I have controls like combos with record source to the same table as above. Even open table by mouse click is impossible at that stage, and soon the problem is spreading to all tables in database.

The only solution is to close all open files from Computer Management on server, but this is madness. Changing record-level locking doesn’t solve the problem, just make it less frequent. Default record locking is No locks.

The big issue is the application has run for almost 10 years without problems like this.



Viewing all articles
Browse latest Browse all 28

Trending Articles