Database Constructor (filePath, outputPath)

Microsoft Deployment Tools

Deployment Tools Foundation Database Constructor (filePath, outputPath)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseDatabase(String, String)
Opens an existing database with another database as output.
Declaration Syntax
C# Visual Basic Visual C++
public Database(
	string filePath,
	string outputPath
)
Public Sub New ( _
	filePath As String, _
	outputPath As String _
)
public:
Database(
	String^ filePath, 
	String^ outputPath
)
Parameters
filePath (String)
Path to the database to be read.
outputPath (String)
Open mode for the database
Return Value
Database object representing the created or opened database
Remarks

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 is not persisted with the database. To create or modify the summary information for the output database it must be closed and re-opened.

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.

The database is opened in CreateDirect mode, and will be automatically commited when it is closed.

Win32 MSI API: MsiOpenDatabase

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

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)