This document is archived and information here might be outdated. Recommended version. |
Executes the specified SQL statement.
[Visual Basic .NET]
Public Sub ExecuteSQL ( _
ByVal sqlStmt As String _
)
[C#]
public void ExecuteSQL (
string sqlStmt
);
[C++]
HRESULT ExecuteSQL(
BSTR sqlStmt
);
[C++] Parameters sqlStmt [in]
sqlStmt is a parameter of type BSTR
The ExecuteSQL method can be used to send an arbitrary SQL statement to the underlying database for execution. The statement can be any DDL (data definition language) or DML (data manipulation language) statement but can not return any result sets. The syntax for the SQL is as required by the underlying database. The workspace supports an optional ISQLSyntax interface that provides information to applications on aspects of the SQL Syntax for the underlying database.
To determine if a workspace supports the ExecutesSQL method, an application can check the value of the canExecuteSQLworkspace property via the optional IWorkspaceProperties interface. In general, this method is only supported on local and remote database workspaces.