Open a DDE channel

Microsoft Query

Show All

Open a DDE channel

To open a DDE channel, your procedure uses the DDEInitiate method. The DDEInitiate method has two arguments: the name of the source program and the "subject" of the DDE conversation (called the topic). The program name for Microsoft Query is "MSQuery."

Microsoft Query topics can be one of the following.

Topic Description
query_window_name The name of an open query window. The window name can be specified only if Microsoft Query is running and a window is open.
System A general topic that allows the destination program to link to Microsoft Query itself rather than to a query window, a file, or an SQL SELECT statement.
When Microsoft Query receives a request for a DDE conversation about a topic it recognizes, it responds and opens a channel. The DDEInitiate method returns a DDE channel number, which can be assigned to a variable and used for subsequent operations on this channel.

To open multiple windows on a single channel, use the System topic. When you use the System topic to open a DDE channel, you can activate only windows that were opened on that DDE channel.