The DQL object encapsulates a select statement. The management of the DQL object is done by the SQL
object and a DQL object is an item in the SQL.Statements collection. The index property
of the DQL object corresponds to the index in the Statements collection.
To use the DQL object use SQL object to assign a new SQL statement. The SQL
object will populate the Statements collection. A reference to the DQL object can be created by using a command
like: Set myvar = SQLXL.SQL.Statements(1)
The execute method of the DQL object will run the query and prepare the resultset. The Target property will
determine where the output will go. The Target object can be referenced
using the Targets collection of the SQLXL object: Set myvar = SQLXL.Targets(
litExcel ) The Target object manages the options surrounding the output
of the data, e.g. whether column heading should be printed etc.
Properties:
Name
Data Type
Description
OptimiseForLargeQuery
As Boolean
When False it returns a flexible resultset which can be used for
updates and it can be navigated. When it is navigated more and more memory
is needed to store the records. When set to True a resultset with
minimal features is returned. Navigating through this resultset will not
grow the memory usage.
ShowParametersDlg
As Boolean
When parameters are used in the query, setting this property to True will display the Parameters
Dialog to take the parameter values.
Sets the target for the
output of the query. Possible values are Targets(litExcel),
Targets(litOutlook), Targets(litWord), Targets(litPDF), Targets(litText), Targets(litXLS), Targets(litPivotTable), Table(litNone)
Text
As String
The text of the SQL Statement
Methods:
Name
Data Type
Description
Execute
Executes the SQL Statement
Example:
Show the resultset options dialog to allow the user to specify options for the SQL statement:
SQLXL.SQL.setText Text:="select * from emp;"
Set SQLXL.SQL.Statements(1).Target= Targets(litExcel )
SQLXL.SQL.Statements(1).ShowResultsetDlg = True
SQLXL.SQL.Statements(1).Execute
Copyright (C) 1995-2007 Linker IT
Software BV. All Rights Reserved. Oracle is a registered trademark of
Oracle corporation. Excel and Office are registered trademarks of
Microsoft corporation. Other names appearing on the site may be trademarks
of their respective owners. Software,
files, documents, articles and other material are provided
"as is" and without warranties as to performance or mechantability or
any other warranties whether expressed or implied. No
warranty of fitness for a particular purpose is offered.
sitemap