Linker IT Software
Order Home
menubar-top-links menubar-top-rechts

SQL*XL: Database to Excel bridge

Related LIT software: litLIB: Excel power functions pack encOffice: Protect your Excel file easy and safe

Home Products SQL*XL Help VBA SQLXL SQL Statements Statement

Buy now

Download now

SQL*XL online help


SQL*XL API: Statement Object

Statement Object



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

SQL*XL ribbon in Excel