troubleshooting Question

Scope of "DBEngine.SetOption dbMaxLocksPerFile, 50000"

Avatar of mlcktmguy
mlcktmguyFlag for United States of America asked on
Microsoft Access
2 Comments2 Solutions227 ViewsLast Modified:
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

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.
Join our community to see this answer!
Unlock 2 Answers and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros