Statement Object |
home |
Statements | |
Statement |
The Statement object represents a single SQL statement. A Statement is always instantiated by the SQL object which adds it to the Statements collection. Use the Excecute method to execute the statement.
Depending on the type of Statement there are additional properties and methods. To find the type of Statement use the TypeName function on the Statement object. The Statement Types available are:
Type | Class Name | Description |
DQL | clsStmtDQL | A DQL Statement ; a select statement |
DMLDDL | clsStmtDMLDDL | A data manipulation or data definition statement ; e.g. update, delete, insert statements |
PLSQL | clsStmtPLSQL | A PL/SQL statement |
SQLPLUS | clsStmtSQLPlus | A SQL*Plus statement ; e.g. column empno format 00000; |
Name | Data Type | Description |
Index | As Long | The index of this Statement Object in the SQL.Statements collection. |
Text | As Text | The text of the SQL Statement |
Name | Data Type | Description |
Execute | Executes the SQL Statement. |
Select Case TypeName(SQL.Statements(2)) Case "clsStmtDQL":
Msgbox "This is a select statement" Case "clsStmtPLSQL": Msgbox "This is a PL/SQL statement"
End Select