Data Access Objects (DAO) Constants

Microsoft DAO 3.60

DAO Constants

       

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 Container or Document object:

Constant Description
dbSecReadDef Allows user to read the table definition, including column and index information.
dbSecWriteDef Allows user to modify or delete the table definition, including column and index information.
dbSecRetrieveData Allows user to retrieve data from the Document object.
dbSecInsertData Allows user to add records.
dbSecReplaceData Allows user to modify records.
dbSecDeleteData Allows user to delete records.

The Databases container or any Document object in a Documents collection may include the following:

Constant Description
dbSecDeleteData Allows user to delete records.
dbSecDBAdmin Allows user to replicate the database and change the database password.
dbSecDBCreate Allows user to create new databases. This setting is valid only on the Databases container in the workgroup information file (System.mdw).
dbSecDBExclusive Allows user exclusive access to the database.
dbSecDBOpen Allows user to open the database.

Attributes Property Constants

For any Field 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 TableDef objects opened from .mdb files)
dbUpdatableField Field is updatable
dbDescending Field sorted in descending order (Microsoft Jet workspaces only)
dbHyperlinkField The field contains hyperlink information (Memo fields in Microsoft Jet workspaces only)
dbSystemField The field is a replication field (on a TableDef object in Microsoft Jet databases only)

For any Relation 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
dbRelationLeft Microsoft Access only. In Design view, display a LEFT JOIN as the default join type.
dbRelationRight Microsoft Access only. In Design view, display a RIGHT JOIN as the default join type.

For any TableDef 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 Description
dbSortArabic Arabic collating order
dbSortChineseSimplified Simplified Chinese collating order
dbSortChineseTraditional Traditional Chinese collating order
dbSortCyrillic Russian collating order
dbSortCzech Czech collating order
dbSortDutch Dutch collating order
dbSortGeneral English, German, French, and Portuguese collating order
dbSortGreek Greek collating order
dbSortHebrew Hebrew collating order
dbSortHungarian Hungarian collating order
dbSortIcelandic Icelandic collating order
dbSortJapanese Japanese collating order
dbSortKorean Korean collating order
dbSortNeutral Neutral collating order
dbSortNorw Norwegian and Danish collating order
dbSortPDXIntl Paradox international collating order
dbSortPDXNor Paradox Norwegian and Danish collating order
dbSortPDXSwe Paradox Swedish and Finnish collating order
dbSortPolish Polish collating order
dbSortSlovenian Slovenian collating order
dbSortSpanish Spanish collating order
dbSortSwedFin Swedish and Finnish collating order
dbSortThai Thai collating order
dbSortTurkish Turkish collating order
dbSortUndefined Collating order 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 FoxPro Cursor Library. This option is required for performing batch updates.
dbUseNoCursor Opens all cursors (that is, Recordset 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 Container 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 Container, the Permissions property may include any of the following (All are ):

Constant Description
dbSecDBAdmin Gives user permission to make a database replicable and change the database password.
dbSecDBCreate Allows user to create new databases (valid only on the databases Container object in the system database).
dbSecDBOpen Allows user to open the database.
dbSecDBExclusive Allows user exclusive access.

For any tables Container, the Permissions property may include any of the following (All are ):

Constant Description
dbSecCreate Allows user to create new tables (valid only with a Container object that represents a table or with the databases Container object in the system database).
dbSecReadDef Allows user to read the table definition, including column and index information.
dbSecWriteDef Allows user to modify or delete the table definition, including column and index information.
dbSecRetrieveData Allows user to retrieve data from the document.
dbSecInsertData Allows user to add records.
dbSecReplaceData Allows user to modify records.
dbSecDeleteData Allows user to delete records.

For any Document object, the Permissions property may include any of the following (All are ):

Constant Description
dbSecCreate Allows user to create new tables (valid only with a Container object that represents a table).
dbSecDBCreate Allows user to create new databases (valid only on the databases Container object in the system database).
dbSecDBOpen Allows user to open the database.
dbSecDBExclusive Allows user exclusive access.
dbSecDelete Allows user to delete the object.
dbSecDeleteData Allows user to delete records.
dbSecFullAccess Allows user full access to the object.
dbSecInsertData Allows user to add records.
dbSecReadDef Allows user to read the table definition, including column and index information.
dbSecReadSec Allows user to read the object's security-related information.
dbSecReplaceData Allows user to modify records.
dbSecRetrieveData Allows user to retrieve data from the document.
dbSecWriteDef Allows user to modify or delete the table definition, including column and index information.
dbSecWriteSec Allows user to alter access permissions.
dbSecWriteOwner Allows user to change the Owner property setting.

Prepare Property Constants (All Are )

Constant Description
dbQPrepare (Default) The statement is prepared (that is, the ODBC SQLPrepare API is called).
dbQUnprepare The statement is not prepared (that is, the ODBC SQLExecDirect API is called).

RecordStatus Property Constants (All Are )

Constant Description
dbDBDeleted The record has been deleted locally and in the database.
dbDeleted The record has been deleted, but not yet deleted in the database.
dbRecordModified The record has been modified and not updated in the database.
dbRecordNew The record has been inserted with the AddNew method, but not yet inserted into the database.
dbRecordUnmodified (Default) The record has not been modified or has been updated successfully.

Type Property Constants

For any Field, Parameter, or Property object, the Type property may include any of the follwing (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 QueryDef 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 Recordset object, the Type property may include any of the following (All are ):

Constants Description
dbOpenDynamic Opens a dynaset-type Recordset (ODBCDirect workspaces only)
dbOpenDynaset Opens a dynaset-type Recordset
dbOpenForwardOnly Opens a forward-only type Recordset
dbOpenSnapshot Opens a snapshot-type Recordset
dbOpenTable Opens a table-type Recordset (Microsoft Jet workspaces only)

UpdateOptions Property Constants (All Are )

Constant Description
dbCriteriaKey (Default) Uses just the key column(s) in the where clause.
dbCriteriaModValues Uses the key column(s) and all updated columns in the where clause.
dbCriteriaAllCols Uses the key column(s) and all the columns in the where clause.
dbCriteriaTimeStamp Uses just the timestamp column if available (will generate a run-time error if no timestamp column is in the result set).
dbCriteriaDeleteInsert Uses a pair of DELETE and INSERT statements for each modified row.
dbCriteriaUpdate (Default) Uses 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 Workspace object Type property and DBEngine 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 Recordset (ODBCDirect workspaces only)
dbOpenDynaset Opens a dynaset-type Recordset
dbOpenForwardOnly Opens a forward-only type Recordset
dbOpenSnapshot Opens a snapshot-type Recordset
dbOpenTable Opens a table-type Recordset (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 Recordset records (Microsoft Jet workspaces only).
dbDenyRead Prevents other users from reading Recordset records (table-type in Microsoft Jet workspaces only).
dbReadOnly Opens the Recordset 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 Recordset (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 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

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.