DAO Workspace: Accessing Properties of the Database Engine

OverviewHow Do IFAQSampleODBC Driver List

If you need to get or set any of the properties of the database engine behind your workspaces, you'll need a object whose static member functions provide access to those properties.

To access properties of the database engine

  1. Construct a CDaoWorkspace object, or use a pointer to one provided by a or object.

  2. Call any of the workspace's static member functions. You do not need to call or to call these member functions.

Accessing Database Engine Properties

The following table describes the CDaoWorkspace member functions that relate to database engine properties.

Workspace Member Functions for Database Engine Access

DAO property Member functions Description
Version Get the version number of the Microsoft Jet database file.
DefaultPassword Specify the default password that the database engine uses when you create new workspaces without specifying a password. Setting this property is optional. You can instead require that new workspaces supply a password.
DefaultUser Specify the default user name that the database engine uses when you create new workspaces without specifying a user name. As with SetDefaultPassword, setting this property is optional.
LoginTimeout , Specify the number of seconds to wait before an ODBC connection attempt times out. DAO sets a default, so setting this property is optional.
IniPath , Specify a Windows registry key under which are stored application-specific options relating to special settings for the database engine. Setting this property is optional and not often needed.

CDaoWorkspace also supplies member functions for compacting (or copying) a Microsoft Jet (.MDB) database and for attempting to repair a corrupt .MDB database file. See and .

More Information About These Properties

For more information, see the DAO Help topics for the named properties in the table Workspace Member Functions for Database Engine Access above. Topic names are of the form: “propertyname Property.” For example, the topic for the Version property is Version Property. See also the member functions listed and the article DAO Workspace: Accessing Properties of the Database Engine.

See Also   DAO: Where Is..., DAO Workspace, DAO Workspace: The Database Engine