Temporarily overrides values for the Microsoft Jet database engine keys in the Windows registry (Microsoft Jet workspaces only).
Syntax
VOIDSetOption(LONG lOption,
LPVARIANT pvValue);
Parameters
| Type | Example | Description |
| LONG | lOption | 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. |
Remarks
Use the SetOption method to override registry values at run-time. New values remain in effect until changed again by another SetOption call, or until the CdbDBEngine object is closed.
The following are valid Option values.
| 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 |
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);
...