Deployment Tools Foundation
ExecuteStringQuery Method (sqlFormat, args)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Database ► ExecuteStringQuery(String, array<Object>[]()[][])
Executes the specified SQL SELECT query and returns all results as strings.
Declaration Syntax| C# | Visual Basic | Visual C++ |
public IList<string> ExecuteStringQuery( string sqlFormat, params Object[] args )
Public Function ExecuteStringQuery ( sqlFormat As String, ParamArray args As Object() ) As IList(Of String)
public: IList<String^>^ ExecuteStringQuery( String^ sqlFormat, ... array<Object^>^ args )
RemarksThe sqlFormat parameter is formatted using Format(String, array<Object>[]()[][]).
Multiple rows columns will be collapsed into a single on-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.9.1006.0)