Link to home
Start Free TrialLog in
Avatar of mlcktmguy
mlcktmguyFlag for United States of America

asked on

Scope of "DBEngine.SetOption dbMaxLocksPerFile, 50000"

I am writing a conversion that is totally data orientated.  Reading legacy records in an old format then reformatting and writing them many time.  Some files with several million records.

I was having some issues and got some very good advice on EE, which was to use this statement to increase the number of locks permitted.
DBEngine.SetOption dbMaxLocksPerFile, 50000

Open in new window


I used the statement in the procedure I was having issues with and it solved the issue.  Now I am wondering what the scope of the statement is.  Meaning, do I have to put it in every module doing the heavy processing or is it a 'set once and it becomes the default throughout your application, until you exit the application.

As a precaution I was thinking of putting the statement at the beginning of every one of my heavy processing routines.  However I am guessing there is overhead related to this command so I don't want to execute it unless necessary.
ASKER CERTIFIED SOLUTION
Avatar of crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial