Deployment Tools Foundation
QDatabase Constructor (filePath)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller.Linq ► QDatabase ► QDatabase(String)
Opens an existing database in read-only mode.
Declaration Syntax
C# | Visual Basic | Visual C++ | F# |
public QDatabase( string filePath )
Public Sub New ( filePath As String )
public: QDatabase( String^ filePath )
new : filePath : string -> QDatabase
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. 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)