Dela via


CDaoDatabase Members

Base Class Members

CObject Members

CDaoDatabase Members

Data Members

m_pDAODatabase

A pointer to the underlying DAO database object.

m_pWorkspace

A pointer to the CDaoWorkspace object that contains the database and defines its transaction space.

Construction

CDaoDatabase

Constructs a CDaoDatabase object. Call Open to connect the object to a database.

Attributes

CanTransact

Returns nonzero if the database supports transactions.

CanUpdate

Returns nonzero if the CDaoDatabase object is updatable (not read-only).

GetConnect

Returns the connection string used to connect the CDaoDatabase object to a database. Used for ODBC.

GetName

Returns the name of the database currently in use.

GetQueryTimeout

Returns the number of seconds after which database query operations will time out. Affects all subsequent open, add new, update, and edit operations and other operations on ODBC data sources (only) such as Execute calls.

GetRecordsAffected

Returns the number of records affected by the last update, edit, or add operation or by a call to Execute.

GetVersion

Returns the version of the database engine associated with the database.

IsOpen

Returns nonzero if the CDaoDatabase object is currently connected to a database.

SetQueryTimeout

Sets the number of seconds after which database query operations (on ODBC data sources only) will time out. Affects all subsequent open, add new, update, and delete operations.

Operations

Close

Closes the database connection.

Create

Creates the underlying DAO database object and initializes the CDaoDatabase object.

CreateRelation

Defines a new relation among the tables in the database.

DeleteQueryDef

Deletes a querydef object saved in the database's QueryDefs collection.

DeleteRelation

Deletes an existing relation between tables in the database.

DeleteTableDef

Deletes the definition of a table in the database. This deletes the actual table and all of its data.

Execute

Executes an action query. Calling Execute for a query that returns results throws an exception.

GetQueryDefCount

Returns the number of queries defined for the database.

GetQueryDefInfo

Returns information about a specified query defined in the database.

GetRelationCount

Returns the number of relations defined between tables in the database.

GetRelationInfo

Returns information about a specified relation defined between tables in the database.

GetTableDefCount

Returns the number of tables defined in the database.

GetTableDefInfo

Returns information about a specified table in the database.

Open

Establishes a connection to a database.

See Also

Reference

CDaoDatabase Class

Hierarchy Chart