DAO provides built-in constants that you can use with methods or properties. These constants all begin with the letters db and are documented with the method or property to which they apply.
Legend:
Read-only
Read/write
AllPermissions Property Constants (All are )
For any CdbContainer or CdbDocument object:
Constant | Allows user to |
dbSecReadDef | Read the table definition, including column and index information |
dbSecWriteDef | Modify or delete the table definition, including column and index information |
dbSecRetrieveData | Retrieve data from the CdbDocument object |
dbSecInsertData | Add records |
dbSecReplaceData | Modify records |
dbSecDeleteData | Delete records |
The Databases container or any CdbDocument object in a Documents collection may include the following:
Constant | Allows user to |
dbSecDeleteData | Delete records |
dbSecDBAdmin | Replicate the database and change the database password |
dbSecDBCreate | Create new databases; this setting is valid only on the Databases container in the workgroup information file (System.mdw) |
dbSecDBExclusive | Have exclusive access to the database |
dbSecDBOpen | Open the database |
Attributes Property Constants
For any CdbField object, the Attributes property may include the following:
Constant | Description |
dbFixedField | Fixed field size (default for Numeric fields) |
dbVariableField | Variable field size (Text fields only) |
dbAutoIncrField | New record field value incremented to unique Long integer (in a Microsoft Jet workspace, available only on CdbTableDef objects opened from .mdb files) |
dbUpdatableField | Field is updatable |
dbDescending | Field sorted in descending order (Microsoft Jet workspaces only) |
dbHyperlinkField | Field contains hyperlink information (Memo fields in Microsoft Jet workspaces only) |
dbSystemField | Field is a replication field (on a CdbTableDef object in Microsoft Jet databases only) |
For any CdbRelation object, the Attributes property may include the following:
Constant | Description |
dbRelationUnique | One-to-one relationship |
dbRelationDontEnforce | Relationship not enforced (no referential integrity) |
dbRelationInherited | Relationship exists in the database containing the two linked tables |
dbRelationUpdateCascade | Updates cascade |
dbRelationDeleteCascade | Deletions cascade |
For any CdbTableDef object, the Attributes property may include the following:
Constant | Description |
dbAttachExclusive | Opens a linked Microsoft Jet database engine table for exclusive use |
dbAttachSavePWD | Saves user ID and password for linked remote table |
dbSystemObject | System table |
dbHiddenObject | Hidden table (for temporary use) |
dbAttachedTable | Linked non-ODBC database table |
dbAttachedODBC | Linked ODBC database table |
CollatingOrder Property Constants (All are )
Constant | Collating order |
dbSortArabic | Arabic |
dbSortChineseSimplified | Simplified Chinese |
dbSortChineseTraditional | Traditional Chinese |
dbSortCyrillic | Russian |
dbSortCzech | Czech |
dbSortDutch | Dutch |
dbSortGeneral | English, German, French, and Portuguese |
dbSortGreek | Greek |
dbSortHebrew | Hebrew |
dbSortHungarian | Hungarian |
dbSortIcelandic | Icelandic |
dbSortJapanese | Japanese |
dbSortKorean | Korean |
dbSortNeutral | Neutral |
dbSortNorwDan | Norwegian and Danish |
dbSortPDXIntl | Paradox international |
dbSortPDXNor | Paradox Norwegian and Danish |
dbSortPDXSwe | Paradox Swedish and Finnish |
dbSortPolish | Polish |
dbSortSlovenian | Slovenian |
dbSortSpanish | Spanish |
dbSortSwedFin | Swedish and Finnish |
dbSortThai | Thai |
dbSortTurkish | Turkish |
dbSortUndefined | Undefined or unknown |
DefaultCursorDriver Property (All are )
Constant | Description |
dbUseDefaultCursor | (Default) Uses server-side cursors if the server supports them; otherwise uses the ODBC Cursor Library |
dbUseODBCCursor | Always uses the ODBC Cursor Library; this option provides better performance for small result sets, but degrades quickly for larger result sets |
dbUseServerCursor | Always uses server-side cursors; for most large operations this option provides better performance, but might cause more network traffic |
dbUseClientBatchCursor | Always uses the Microsoft Visual FoxPro Cursor Library; this option is required for performing batch updates |
dbUseNoCursor | Opens all cursors (that is, CdbRecordset objects) as forward-only type, read-only, with a rowset size of 1; also known as "cursorless queries" |
Direction Property Constants (All are )
Constant | Description |
dbParamInput | (Default) Passes information to the procedure |
dbParamInputOutput | Passes information both to and from the procedure |
dbParamOutput | Returns information from the procedure as in an output parameter in SQL |
dbParamReturnValue | Passes the return value from a procedure |
EditMode Property Constants (All are )
Constant | Description |
dbEditNone | No editing operation in effect |
dbEditInProgress | Edit method invoked |
dbEditAdd | AddNew method invoked |
Permissions Property Constants (All are )
For any CdbContainer object, the Permissions property may include the following:
Constant | Description |
dbSecNoAccess | Denies user access to the object |
dbSecFullAccess | Allows user full access to the object |
dbSecDelete | Allows user to delete the object |
dbSecReadSec | Allows user to read the object's security-related information |
dbSecWriteSec | Allows user to alter access permissions |
dbSecWriteOwner | Allows user to change the Owner property setting |
For any database CdbContainer, the Permissions property may include any of the following (All are ):
Constant | Allows user to |
dbSecDBAdmin | Have permission to make a database replicable and change the database password |
dbSecDBCreate | Create new databases (valid only on the databases Container object in the system database) |
dbSecDBOpen | Open the database |
dbSecDBExclusive | Exclusive access |
For any tables CdbContainer, the Permissions property may include any of the following (All are ):
Constant | Allows user to |
dbSecCreate | Create new tables (valid only with a CdbContainer object that represents a table or with the databases CdbContainer object in the system database) |
dbSecReadDef | Read the table definition, including column and index information |
dbSecWriteDef | Modify or delete the table definition, including column and index information |
dbSecRetrieveData | Retrieve data from the document |
dbSecInsertData | Add records |
dbSecReplaceData | Modify records |
dbSecDeleteData | Delete records |
For any CdbDocument object, the Permissions property may include any of the following (All are ):
Constant | Allows user to |
dbSecCreate | Create new tables (valid only with a CdbContainer object that represents a table) |
dbSecDBCreate | Create new databases (valid only on the databases CdbContainer object in the system database) |
dbSecDBOpen | Open the database |
dbSecDBExclusive | Exclusive access |
dbSecDelete | Delete the object |
dbSecDeleteData | Delete records |
dbSecFullAccess | Full access to the object |
dbSecInsertData | Add records |
dbSecReadDef | Read the table definition, including column and index information |
dbSecReadSec | Read the object's security-related information |
dbSecReplaceData | Modify records |
dbSecRetrieveData | Retrieve data from the document |
dbSecWriteDef | Modify or delete the table definition, including column and index information |
dbSecWriteSec | Alter access permissions |
dbSecWriteOwner | Change the Owner property setting |
Prepare Property Constants (All are )
Constant | Description: The Statement is |
dbQPrepare | (Default) Prepared (that is, the ODBC SQLPrepare API is called) |
dbQUnprepare | Not prepared (that is, the ODBC SQLExecDirect API is called) |
RecordStatus Property Constants (All are )
Constant | Description: The Record has |
dbDBDeleted | Been deleted locally and in the database |
dbDeleted | Been deleted, but not yet deleted in the database |
dbRecordModified | Been modified and not updated in the database |
dbRecordNew | Been inserted with the AddNew method, but not yet inserted into the database |
dbRecordUnmodified | (Default) Not been modified or has been updated successfully |
Type Property Constants
For any CdbField, CdbParameter, or CdbProperty object, the Type property may include any of the following (All are ):
Constant | Description |
dbBigInt | Big Integer data (ODBCDirect only) |
dbBinary | Binary data |
dbBoolean | Boolean (True/False) data |
dbByte | Byte (8-bit) data |
dbChar | Character data (ODBCDirect only) |
dbCurrency | Currency data |
dbDate | Date value data |
dbDecimal | Decimal data (ODBCDirect only) |
dbDouble | Double-precision floating-point data |
dbFloat | Floating-point data (ODBCDirect only) |
dbGUID | GUID data |
dbInteger | Integer data |
dbLong | Long Integer data |
dbLongBinary | Binary data (bitmap) |
dbMemo | Memo data (extended text) |
dbNumeric | Numeric data (ODBCDirect only) |
dbSingle | Single-precision floating-point data |
dbText | Text data (variable width) |
dbTime | Data in time format (ODBCDirect only) |
dbTimeStamp | Data in time and date format (ODBCDirect only) |
dbVarBinary | Variable Binary data (ODBCDirect only) |
For any CdbQueryDef object, the Type property may include any of the following (All are ):
Constant | Description |
dbQAction | Action query |
dbQAppend | Append query |
dbQCompound | Compound query (ODBCDirect workspaces only) |
dbQCrosstab | Crosstab query |
dbQDDL | Data-definition language (DDL) query |
dbQDelete | Delete query |
dbQMakeTable | Make-table query |
dbQProcedure | SQL procedure that executes a stored procedure (ODBCDirect workspaces only) |
dbQSelect | Select query |
dbQSetOperation | Set operation query |
dbQSPTBulk | Bulk operation query |
dbQSQLPassThrough | SQL pass-through query |
dbQUpdate | Update query |
For any CdbRecordset object, the Type property may include any of the following (All are ):
Constants | Indicates a |
dbOpenDynamic | Dynaset-type CdbRecordset (ODBCDirect workspaces only) |
dbOpenDynaset | Dynaset-type CdbRecordset |
dbOpenForwardOnly | Forward-only type CdbRecordset |
dbOpenSnapshot | Snapshot-type CdbRecordset |
dbOpenTable | Table-type CdbRecordset (Microsoft Jet workspaces only) |
UpdateOptions Property Constants (All are )
Constant | Uses |
dbCriteriaKey | (Default) Just the key column(s) in the where clause |
dbCriteriaModValues | Key column(s) and all updated columns in the where clause |
dbCriteriaAllCols | Key column(s) and all the columns in the where clause |
dbCriteriaTimeStamp | Just the timestamp column if available (will generate a run-time error if no timestamp column is in the result set) |
dbCriteriaDeleteInsert | A pair of DELETE and INSERT statements for each modified row |
dbCriteriaUpdate | (Default) An UPDATE statement for each modified row |
CompactDatabase, CreateDatabase Methods Locale Argument Constants (All are )
Constant | Description |
dbLangGeneral | English, German, French, Portuguese, Italian, and Modern Spanish |
dbLangArabic | Arabic |
dbLangChineseSimplified | Simplified Chinese |
dbLangChineseTraditional | Traditional Chinese |
dbLangCyrillic | Russian |
dbLangCzech | Czech |
dbLangDutch | Dutch |
dbLangGreek | Greek |
dbLangHebrew | Hebrew |
dbLangHungarian | Hungarian |
dbLangIcelandic | Icelandic |
dbLangJapanese | Japanese |
dbLangKorean | Korean |
dbLangNordic | Nordic |
dbLangNorwDan | Norwegian and Danish |
dbLangPolish | Polish |
dbLangSlovenian | Slovenian |
dbLangSpanish | Spanish |
dbLangSwedfin | Swedish and Finnish |
dbLangThai | Thai |
dbLangTurkish | Turkish |
CompactDatabase Method Options Argument Constants (All are )
Constant | Description |
dbDecrypt | Decrypts database while compacting |
dbEncrypt | Encrypts database |
dbVersion10 | Microsoft Jet database engine version 1.0 |
dbVersion11 | Microsoft Jet database engine version 1.1 |
dbVersion20 | Microsoft Jet database engine version 2.0 |
dbVersion30 | Microsoft Jet database engine version 3.0 |
CreateDatabase Method Options Argument Constants (All are )
Constant | Description |
dbEncrypt | Encrypts database |
dbVersion10 | Microsoft Jet database engine version 1.0 |
dbVersion11 | Microsoft Jet database engine version 1.1 |
dbVersion20 | Microsoft Jet database engine version 2.0 |
dbVersion30 | Microsoft Jet database engine version 3.0 |
CreateWorkspace Method Type Argument Constants
For any CdbWorkspace object Type property and CdbDBEngine object DefaultType property, use any of the following: (All are )
Constant | Description |
dbUseODBC | The next workspace created will use ODBCDirect |
dbUseJet | The next workspace created will use the Microsoft Jet database engine |
Execute Method Options Argument Constants (All are )
Constant | Description |
dbDenyWrite | Denies write permission to other users (Microsoft Jet workspaces only). |
dbInconsistent | Allows inconsistent updates (Microsoft Jet workspaces only). |
dbConsistent | Allows consistent updates (Microsoft Jet workspaces only). |
dbSQLPassThrough | An SQL pass-through. Causes the SQL statement to be passed to an ODBC database for processing (Microsoft Jet workspaces only) |
dbFailOnError | Rolls back updates if an error occurs (Microsoft Jet workspaces only) |
dbSeeChanges | Generates a run-time error if another user is changing data you are editing (Microsoft Jet workspaces only) |
dbRunAsync | Executes the query asynchronously (ODBCDirect workspaces only) |
dbExecDirect | Executes the query without first calling the SQLPrepare ODBC function (ODBCDirect workspaces only) |
Idle Method Optional Argument Constant (This is )
Constant | Description |
dbRefreshCache | Forces any pending writes to disk, and refreshes memory from current disk files |
MakeReplica Method Optional Argument Constants (All are )
Constant | Description |
dbRepMakePartial | Creates a partial replica |
dbRepMakeReadOnly | Makes replicable elements of new database read-only |
OpenConnection and OpenDatabase Methods Option Argument Constants (All are )
Constant | Description |
dbDriverNoPrompt | The driver manager uses the connection string provided in connect. If sufficient information is not provided, a trappable error is returned |
dbDriverPrompt | The driver manager displays the ODBC Data Sources dialog box. The connection string used to establish the connection is constructed from the data source name (DSN) selected and completed by the user via the dialog boxes. |
dbDriverComplete | If the connection string provided includes the DSN keyword, the driver manager uses the string as provided in connect, otherwise it behaves as it does when dbDriverPrompt is specified |
dbDriverCompleteRequired | (Default) Behaves like dbDriverComplete except the driver disables the controls for any information not required to complete the connection |
OpenRecordset Method Type Argument Constants (All are )
Constant | Description |
dbOpenDynamic | Opens a dynamic-type CdbRecordset (ODBCDirect workspaces only) |
dbOpenDynaset | Opens a dynaset-type CdbRecordset |
dbOpenForwardOnly | Opens a forward-only type CdbRecordset |
dbOpenSnapshot | Opens a snapshot-type CdbRecordset |
dbOpenTable | Opens a table-type CdbRecordset (Microsoft Jet workspaces only) |
OpenRecordset Method LockEdits Argument Constants (All are )
Constant | Description |
dbPessimistic | Pessimistic concurrency. Cursor uses the lowest level of locking sufficient to ensure the record can be updated. |
dbReadOnly | Cursor is read-only. No updates are allowed. |
dbOptimistic | Optimistic concurrency based on record ID. Cursor compares record ID in old and new records to determine if changes have been made since the record was last accessed. |
dbOptimisticValue | Optimistic concurrency based on record values. Cursor compares data values in old and new records to determine if changes have been made since the record was last accessed (ODBCDirect workspaces only). |
dbOptimisticBatch | Enables batch optimistic updates (ODBCDirect workspaces only). |
OpenRecordset Method Options Argument Constants (All are )
Constant | Description |
dbDenyWrite | Prevents other users from changing CdbRecordset records (Microsoft Jet workspaces only) |
dbDenyRead | Prevents other users from reading CdbRecordset records (table-type in Microsoft Jet workspaces only) |
dbReadOnly | Opens the CdbRecordset as read-only (Microsoft Jet workspaces only) |
dbAppendOnly | Allows user to add new records to the dynaset, but prevents user from reading existing records (dynaset-type in Microsoft Jet workspaces only) |
dbInconsistent | Applies updates to all dynaset fields, even if other records are affected (dynaset- and snapshot-type in Microsoft Jet workspaces only) |
dbConsistent | Applies updates only to those fields that will not affect other records in the dynaset (dynaset- and snapshot-type in Microsoft Jet workspaces only) |
dbSQLPassThrough | Sends an SQL statement to an ODBC database (snapshot-type in Microsoft Jet workspaces only) |
dbForwardOnly | Creates a forward-only scrolling snapshot-type CdbRecordset (snapshot-type in Microsoft Jet workspaces only) |
dbSeeChanges | Generates a run-time error if another user is changing data you are editing (dynaset-type in Microsoft Jet workspaces only) |
dbRunAsync | Executes the query asynchronously (ODBCDirect workspaces only) |
dbExecDirect | Executes the query without first calling the SQLPrepare ODBC function (ODBCDirect workspaces only) |
SetOption Method Parameter Constants (All are )
Constant | Description |
dbPageTimeout | PageTimeout key |
dbSharedAsyncDelay | SharedAsyncDelay key |
dbExclusiveAsyncDelay | ExclusiveAsyncDelay key |
dbLockRetry | LockRetry key |
dbUserCommitSync | UserCommitSync key |
dbImplicitCommitSync | ImplicitCommitSync key |
dbMaxBufferSize | MaxBufferSize key |
dbMaxLocksPerFile | MaxLocksPerFile key |
dbLockDelay | LockDelay key |
dbRecycleLVs | RecycleLVs key |
dbFlushTransactionTimeout | FlushTransactionTimeout key |
Synchronize Method Exchange Argument Constants (All are )
Constant | Description |
dbRepExportChanges | Sends changes from current database to target database |
dbRepImportChanges | Receives changes from target database |
dbRepImpExpChanges | Sends and receives data in a bidirectional exchange |
dbRepSyncInternet | Exchanges data between files connected via an Internet pathway |
Update Method Type Argument Constants (All are )
Constant | Description |
dbUpdateRegular | (Default) Pending changes aren't cached and are written to disk immediately |
dbUpdateBatch | All pending changes in the update cache are written to disk |
dbUpdateCurrentRecord | Only the current record's pending changes are written to disk |
CancelUpdate Method Type Argument Constants (All are )
Constant | Description |
dbUpdateRegular | (Default) Pending changes aren't cached and are written to disk immediately |
dbUpdateBatch | All pending changes in the update cache are written to disk |