OpenView Method (sqlFormat, args)

Microsoft Deployment Tools

Deployment Tools Foundation OpenView Method (sqlFormat, args)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseOpenView(String, array<Object>[]()[])
Gets a View object representing the query specified by a SQL string.
Declaration Syntax
C# Visual Basic Visual C++
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
)
Parameters
sqlFormat (String)
SQL query string, which may contain format items
args (array< Object >[]()[])
Zero or more objects to format
Return Value
A View object representing the query specified by a SQL string
Remarks

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

Exceptions
Exception Condition
BadQuerySyntaxException the SQL syntax is invalid
InvalidHandleException the Database handle is invalid

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