PreviousNextIndex

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

DDE INITIATE ddeid FRAME frame-handle 
  APPLICATION server-name TOPIC topic-name [ NO-ERROR ] 

ddeid-var
FRAME frame-handle
APPLICATION server-name
TOPIC topic-name
NO-ERROR
Example

The 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:

DEFINE VARIABLE Sheet1   AS INTEGER NO-UNDO. /* DDE-ID to worksheet topic */ 
DEFINE VARIABLE DDEframe AS HANDLE  NO-UNDO. /* DDE frame handle */ 
/* Create DDE frame */ 
CREATE FRAME DDEframe 
  ASSIGN visible = TRUE 
         hidden  = TRUE. 
. . . 
/* Open a DDE conversation with Sheet1 and assign column headings. */ 
DDE INITIATE Sheet1 FRAME DDEframe APPLICATION "Excel" TOPIC "Sheet1". 
DDE SEND Sheet1 SOURCE "Name"      ITEM "R1C1". 
DDE SEND Sheet1 SOURCE "YTD Sales" ITEM "R1C2". 
DDE SEND Sheet1 SOURCE "State"     ITEM "R1C3". 
. . . 

Notes
See also

DDE TERMINATE statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex