Show AllShow All

Open Command (DDE)

Opens and executes a query and displays the data in the Data pane. This command is available only on the system channel.

Syntax

Open(query)

query The name of the Microsoft Query file (for Microsoft Windows, the file name extension is .dqy) or Q+E file (Microsoft Windows only; the file name extension is .qef) that contains the query; or the SQL SELECT statement to execute.

Example

This example opens a query named Sales.

DDEExecute chan, "[Open(""c:\msquery\sales.dqy"")]")
		

This is the same example on the Macintosh.

DDEExecute chan, "[Open(""drivename:msquery:sales"")]")
		

This statement uses an SQL SELECT statement to execute a new query.

DDEExecute chan, "[Open(""SELECT * FROM pubs.dbo.titles"")]")