Temporarily overrides values for the Microsoft Jet database engine keys in the Windows Registry (Microsoft Jet workspaces only).
Syntax
VOIDSetOption(LONG lOptions,
LPVARIANT pvValue );
Parameters
Type | Argument | Description |
LONG | lOptions | A Long which specifies the registry key. Possible values are described in Remarks. |
LPVARIANT | pvValue | A pointer to a variant which specifies a new value for the registry key. |
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, see Initializing the Microsoft Jet 3.5 Database Engine.
Usage
#include <afxole.h>
#include <dbdao.h>
CdbDBEngine dben;
COleVariant vExclusiveAsyncDelay(10, VT_I2),
vSharedAsyncDelay(15, VT_I2);
...
dben.SetOption(dbExclusiveAsyncDelay, &vExclusiveAsyncDelay);
dben.SetOption(dbSharedAsyncDelay, &vSharedAsyncDelay);
...