i have a code that is used to zap a table before another one is called to populate it. this is the portion of the code:
Set rst = dbs.OpenRecordset("R100", dbOpenDynaset)
Do Until rst.EOF
With rst
rst.Delete
rst.MoveNext
End With
Loop
rst.Close
In recent times, however, i keep getting a run-time error (#3052) when the code hits the rst.delete line. the following is the error i get:
"File sharing lock count exceeded. Increase MaxLocksPerFile registry entry."
However, when i kill the code and keep re-trying to execute the same code, it always seem to work after a few attempts.
Can anyone help me figure this out?
Thanks,
Daniel
Set rst = dbs.OpenRecordset("R100", dbOpenDynaset)
Do Until rst.EOF
With rst
rst.Delete
rst.MoveNext
End With
Loop
rst.Close
In recent times, however, i keep getting a run-time error (#3052) when the code hits the rst.delete line. the following is the error i get:
"File sharing lock count exceeded. Increase MaxLocksPerFile registry entry."
However, when i kill the code and keep re-trying to execute the same code, it always seem to work after a few attempts.
Can anyone help me figure this out?
Thanks,
Daniel