Using the SetOption Method from DAO
DAO version 3.6 provides a new way to modify default settings. Microsoft® Windows® Registry settings can now be modified at run time with the SetOption method. To customize the Windows Registry settings, you can use the SetOption method from DAO. With this option, your application obtains the maximum flexibility and control. This approach allows you to create applications that are easier to maintain and that are tuned for maximum performance.
The syntax for doing this is dbEngine.SetOption, constant, NewValueSetting. For example, the following syntax, dbEngine.SetOption dbMaxLocksPerfFile, 20000, would allow Microsoft Jet to track 20,000 locks at one time. The names of defined constants are the same as the registry name with db added as a prefix.
This is the recommended way to fine tune registry settings for your application. This method is the most flexible approach and provides you with the most control over how the registry is changed. With The SetOption method you can specify new settings for any of the following default settings:
- PageTimeout key
- SharedAsyncDelay key
- ExclusiveAsyncDelay key
- LockRetry key
- UserCommitSync key
- ImplicitCommitSync key
- MaxBufferSize key
- MaxLocksPerFile key
- LockDelay key
- RecycleLVs
- FlushTransactionTimeout key