QueryType Request (DDE)

Microsoft Query

Show All Show All

QueryType Request (DDE)

Returns information about the data source for a query. This request is available only on the system channel.

Syntax

QueryType( )

The QueryType request returns a two-element array in xlTable format. The first element contains the type of the query data source, either ODBC or OLE/DB. The second element contains the type of commands accepted by the data source: SQL, Cube, or Cancel, as follows:

QueryType CommandType Description
ODBC SQL The data source is SQL-compliant ODBC.
OLEDB Cube The data source is an OLAP cube. The SQL statement contains the cube name.
ODBC Cancel The user has canceled the query and returned to the destination program.

For information about xlTable format, refer to Visual Basic Help for Microsoft Excel.

Use the QueryType request only as the first request after a UserControl2 command has completed execution.

If QueryType indicates that the data source is an OLAP cube, you can use the ODBCSQLStatement and ConnectionString requests to retrieve the data source information. Learn about how to use DDE requests.