Database Constructor (filePath)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation Database Constructor (filePath)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseDatabase(String)
Opens an existing database in read-only mode.
Declaration Syntax
C# Visual Basic Visual C++
public Database(
	string filePath
)
Public Sub New ( 
	filePath As String
)
public:
Database(
	String^ filePath
)
Parameters
filePath (String)
Path to the database file.
Remarks

Because this constructor initiates database access, it cannot be used with a running installation.

The Database object should be Close()()()()d after use. It is best that the handle be closed manually as soon as it is no longer needed, as leaving lots of unused handles open can degrade performance.

Win32 MSI API: MsiOpenDatabase

Exceptions
Exception Condition
InstallerException the database could not be created/opened

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)