[This is preliminary documentation and subject to change.]
This is the OpenDatabase method of the MsiInstall object. This method opens an existing database or creates a new one, returning an MsiDatabase object. It generates an error if the database object cannot be successfully created and opened.
object.OpenDatabase(name, openMode)
idoReadOnly | = 0 | Open database read-only; no persisted changes. |
idoTransact | = 1 | Open database; read-write in transaction mode. |
idoDirect | = 2 | Open database direct; read-write without transaction. |
idoCreate | = 3 | Create new database; read-write in transaction mode. |
idoCreateDirect | = 4 | Create new database; read-write without transaction mode. |
Database Specifications
The database type is determined by examining path and file content as specified below:
An MSI package if a doc file with the correct CLSID, .msi extension is typical.
Note When a database is opened as the output of another database, the summary information stream of the output database is actually a read-only mirror of the original database and thus cannot be changed. Additionally, it will not be persisted with the database. To create or modify the summary information for the output database it must be closed and re-opened.