![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
Execute Method (sql, record)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Database ► Execute(String, Record)
Executes the query specified by a SQL string. The query may not be a SELECT statement.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ |
public void Execute( string sql, Record record )
Public Sub Execute ( sql As String, record As Record )
public: void Execute( String^ sql, Record^ record )
![](collapse_all.gif)
Win32 MSI APIs: MsiDatabaseOpenView, MsiViewExecute
![](collapse_all.gif)
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)