Execute Method (sqlFormat, args)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation Execute Method (sqlFormat, args)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseExecute(String, array<Object>[]()[][])
Executes the query specified by a SQL string. The query may not be a SELECT statement.
Declaration Syntax
C# Visual Basic Visual C++
public void Execute(
	string sqlFormat,
	params Object[] args
)
Public Sub Execute ( 
	sqlFormat As String,
	ParamArray args As Object()
)
public:
void Execute(
	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
Remarks

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

Win32 MSI APIs: MsiDatabaseOpenView, MsiViewExecute

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)