SQLPlus Object |
home |
Class clsStmtSQLPlus is a subclass of:
Statement |
The SQLPlus object encapsulates a SQL*Plus statement. The management of the SQLPlus objects is done by the SQL object and a SQLPlus object is an item in the SQL.Statements collection. The index property of the SQLPlus object corresponds to the index in the Statements collection.
To use the SQLPlus object use SQL object to assign a new SQL*Plus command. The SQL object will populate the Statements collection. A reference to the SQLPlus object can be created by using a command like: Set myvar = SQLXL.SQL.Statements(1)
The execute method of the SQLPlus object will run the command.
Name | Data Type | Description |
Text | As String | The text of the SQL*Plus command |
Name | Data Type | Description |
Execute | Executes the SQL*Plus command |
Explicitly format numbers to have 5 digits prefixing them with zeroes if needed:
SQLXL.SQL.setText Text:="column empno format 00000"
SQLXL.SQL.Statements(1).Execute
SQLXL.SQL.setText Text:="select empno,ename from emp"
With SQLXL.SQL.Statements(1)
Set .Target= Targets( litExcel )
.Execute
End With