QDatabase Constructor (filePath, outputPath)

DTF API

Copy image CopyHover image
Deployment Tools Foundation QDatabase Constructor (filePath, outputPath)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstaller.LinqQDatabaseQDatabase(String, String)
Opens an existing database with another database as output.
Declaration Syntax
C# Visual Basic Visual C++ F#
public QDatabase(
	string filePath,
	string outputPath
)
Public Sub New ( 
	filePath As String,
	outputPath As String
)
public:
QDatabase(
	String^ filePath, 
	String^ outputPath
)
new : 
        filePath : string * 
        outputPath : string -> QDatabase
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 returned Database object should be Close()()()()d after use. The finalizer will close the handle if it is still open, however due to the nondeterministic nature of finalization 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.

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

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