Name

dbengine.OpenDatabase(dbname, [options], [read-only], [connect])

Synopsis

Copies and compacts a database. The database must be closed.

Argument

Description

dbname

The name and path of the existing database file.

options

A combination of constants that specify characteristics of the recordset. See DAO Help for more information about these options.

read-only

Use True if you want to open the database for read-only access.

connect

A connection string.

See the Database.OpenRecordset method for an example of using OpenDatabase. Note that you use the OpenDatabase method without explicitly specifying the DbEngine object.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.