>

Databases Collection

Description

A Databases collection contains all open Database objects opened or created in a Workspace object of the Microsoft Jet database engine.

Remarks

When you open an existing Database object or create a new one from a Workspace, it is automatically appended to the Databases collection. When you close a Database object with the Close method, it is removed from the Databases collection but not deleted from disk. You should close all open Recordset objects before closing a Database object.

The first database that is opened is appended to the collection as Databases(0). The Name property setting of a database is a string that specifies the path of the database file. You can refer to any Database object in a collection by its Name property using this syntax:

Databases("name")

You can also refer to the object by its ordinal number using this syntax (which refers to the first member of the Databases collection):

Databases(0)

Properties

Count Property.

Methods

Refresh Method.

See Also

Appendix, "Data Access Object Hierarchy."

Specifics (Microsoft Access)

See the Database object specifics (Microsoft Access).

Example

See the Database object example.

Example (Microsoft Access)

See the Database object example (Microsoft Access).