ExecuteScalar Method (sqlFormat, args)
From Microsoft Deployment Tools
Deployment Tools Foundation
ExecuteScalar Method (sqlFormat, args)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Database ► ExecuteScalar(String, array<Object>[]()[])
Executes the specified SQL SELECT query and returns a single result.
First field of the first result
The sqlFormat parameter is formatted using Format(String, array<Object>[]()[]).
Win32 MSI APIs: MsiDatabaseOpenView, MsiViewExecute, MsiViewFetch
| Exception | Condition |
|---|---|
| BadQuerySyntaxException | the SQL syntax is invalid |
| InstallerException | the View could not be executed
or the query returned 0 results |
| InvalidHandleException | the Database handle is invalid |