ExecuteIntegerQuery Method (sqlFormat, args)

DTF API

Copy image CopyHover image
Deployment Tools Foundation ExecuteIntegerQuery Method (sqlFormat, args)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseExecuteIntegerQuery(String, array<Object>[]()[][])
Executes the specified SQL SELECT query and returns all results as integers.
Declaration Syntax
C# Visual Basic Visual C++ F#
public IList<int> ExecuteIntegerQuery(
	string sqlFormat,
	params Object[] args
)
Public Function ExecuteIntegerQuery ( 
	sqlFormat As String,
	ParamArray args As Object()
) As IList(Of Integer)
public:
IList<int>^ ExecuteIntegerQuery(
	String^ sqlFormat, 
	... array<Object^>^ args
)
member ExecuteIntegerQuery : 
        sqlFormat : string * 
        args : Object[] -> IList<int> 
Parameters
sqlFormat (String)
SQL query string, which may contain format items
args (array<Object>[]()[][])
Zero or more objects to format
Return Value
IList<(Of <(<'Int32>)>)>
All results combined into an array
Remarks

The sqlFormat parameter is formatted using Format(String, array<Object>[]()[][]).

Multiple rows columns will be collapsed into a single one-dimensional list.

Win32 MSI APIs: MsiDatabaseOpenView, MsiViewExecute, MsiViewFetch

Exceptions
Exception Condition
BadQuerySyntaxException the SQL syntax is invalid
InstallerException the View could not be executed
InvalidHandleException the Database handle is invalid

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