DDE INITIATE statement
(Windows only)Opens a dynamic data exchange (DDE) client conversation for a specified DDE server application and topic, and associates the new conversation with an ABL frame. To identify the conversation, the statement returns an integer as a unique channel number for this conversation.
This statement is supported only for backward compatibility. Use the Component Object Model (COM) instead.
Note: Does not apply to SpeedScript programming.Syntax
ddeid-var
FRAMEframe-handle
Specifies the handle of the frame that owns the conversation, whereframe-handle
is a HANDLE expression. A frame can own more than one conversation. The AVM records the status of the most recent conversation exchange in a set of DDE frame attributes. These attributes record the status of every dynamic data exchange, including advise exchanges (exchanges triggered by DDE-NOTIFY events). The DDE frame attributes include:
- DDE-ERROR — The DDE error code returned by the most recent exchange
- DDE-ID — The channel number of the conversation that had the most recent exchange
- DDE-ITEM — The name of the data item referenced by the most recent exchange
- DDE-NAME — The name of the server application in the most recent exchange
- DDE-TOPIC — The name of the topic of the most recent exchange
APPLICATIONserver-name
Specifies the name of the server application for the conversation, whereserver-name
is a character expression. The value ofserver-name
must be unique for each DDE server on your system. It is usually the filename of the server executable without the extension (for example, the name EXCEL in Microsoft Excel).TOPICtopic-name
Specifies the name of the topic of the conversation, wheretopic-name
is a character expression. The value oftopic-name
identifies a category defined by the server application. This is usually the name of a file or other container that includes one or more data items (for example, the name of a worksheet, such as Sheet1 in Microsoft Excel). An ABL client can only exchange data with server data items included in the topic of an open conversation.NO-ERRORExampleThe following fragment shows a typical use of the DDE INITIATE statement. It assumes that the Microsoft Excel application is running, and has created the default Excel worksheet, Sheet1. It then uses the DDE INITIATE statement to open a conversation with Sheet1 as the topic. This allows the AVM to exchange data with the cells of the worksheet. In this example, the fragment assigns column headings to the top row of the first three columns in the worksheet:
Notes
- The specified DDE server application must be running on the Windows desktop before you can invoke the DDE INITIATE statement.
- You can close a DDE conversation in three ways: use the DDE TERMINATE statement, leave the scope of the frame that owns the conversation, or terminate the server application or topic associated with the application.
- For more information on using the DDE protocol (including DDE frame attributes) to exchange data with non-ABL applications, see OpenEdge Development: Programming Interfaces.
See also
OpenEdge Release 10.2B
|