DAO 3.5 还提供一个修改缺省设置的新方法。现在,注册表设置可以在执行期间使用
SetOption 方法来修改。这是推荐的方法,用来对应用程序的注册表设置作细微调整。
这个方法是最有灵活性的,且给开发者提供了对于更改注册表的最多的控制。SetOption
方法允许用户对下列设置指定新的值:
?PageTimeout 键
?SharedAsyncDelay 键
?ExclusiveAsyncDelay 键
?LockRetry 键
?UserCommitSync 键
?ImplicitCommitSync 键
?MaxBufferSize 键
?MaxLocksPerFile 键
?LockDelay 键
?RecycleLVs
?FlushTransactionTimeout 键
通过使用 SetOption 方法,您对应用程序可得到最大的灵活性和控制。使用此法可创建
较易维护且能调整到最大执行效率的应用程序。
Temporarily overrides values for the Microsoft Jet database engine keys in the
Windows Registry (Microsoft Jet workspaces only).
Syntax
DBEngine.SetOption parameter, newvalue
The SetOption method syntax has these parts.
Part Description
parameter A Long constant as described in Settings.
newvalue A Variant value that you want to set parameter to.
Settings
Each constant refers to the corresponding registry key in the path Jet/3.5/Engines/Jet 3.5/
(that is, dbSharedAsyncDelay corresponds to the key Jet/3.5/Engines/Jet 3.5/SharedAsyncDelay, and so on.).
Constant Description
dbPageTimeout The PageTimeout key
dbSharedAsyncDelay The SharedAsyncDelay key
dbExclusiveAsyncDelay The ExclusiveAsyncDelay key
dbLockRetry The LockRetry key
dbUserCommitSync The UserCommitSync key
dbImplicitCommitSync The ImplicitCommitSync key
dbMaxBufferSize The MaxBufferSize key
dbMaxLocksPerFile The MaxLocksPerFile key
dbLockDelay The LockDelay key
dbRecycleLVs The RecycleLVs key
dbFlushTransactionTimeout The FlushTransactionTimeout key
Remarks
Use the SetOption method to override registry values at run-time. New values
established with the SetOption method remain in effect until changed again by
another SetOption call, or until the DBEngine object is closed.
For further details on what the registry keys do, and appropriate values to
set them to, seeInitializing the Microsoft Jet 3.5 Database Engine a
ndInitializing the Microsoft Jet 4.0 Database Engine.