![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
OpenView Method (sqlFormat, args)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Database ► OpenView(String, array<Object>[]()[][])
Gets a View object representing the query specified by a SQL string.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ | F# |
public View OpenView( string sqlFormat, params Object[] args )
Public Function OpenView ( sqlFormat As String, ParamArray args As Object() ) As View
public: View^ OpenView( String^ sqlFormat, ... array<Object^>^ args )
member OpenView : sqlFormat : string * args : Object[] -> View
![](collapse_all.gif)
View
A View object representing the query specified by a SQL string
A View object representing the query specified by a SQL string
![](collapse_all.gif)
The sqlFormat parameter is formatted using Format(String, array<Object>[]()[][]).
The View 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: MsiDatabaseOpenView
![](collapse_all.gif)
Exception | Condition |
---|---|
BadQuerySyntaxException | the SQL syntax is invalid |
InvalidHandleException | the Database handle is invalid |
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)