Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## DDE SEND statement

> ##
> (Windows only)

> Sends a new value to a dynamic data exchange (DDE) server data item associated with the specified DDE conversation.

> Note: Does not apply to SpeedScript programming.

> #### Syntax

>     DDE SEND ddeid SOURCE data ITEM name
>       [ TIME seconds ]
>       [ NO-ERROR ]

> ``ddeid``

> An integer expression that equals the channel number of the conversation opened for the specified data item. It is the value returned by the DDE INITIATE statement that opened the conversation.

> `SOURCE `data``

> Specifies the new value for the server data item, where `data` is a character expression that renders the new value in a format acceptable to the data item.

> `ITEM `name``

> Specifies the name of the server data item to receive the new value. The data item `name` is a character expression that identifies the data item according to the conventions of the server application (for example, the row and column coordinates of a worksheet cell, such as R2C1 in Microsoft Excel).

> `TIME `seconds``

> Specifies the maximum number of seconds that the OpenEdge client waits for the DDE SEND statement to complete, where `seconds` is an integer expression. If you do not specify the TIME option or specify a value of 0, Progress waits indefinitely for the statement to complete.

> `NO-ERROR`

> By default, if the statement fails to send the value to the data item, it sets the Progress error condition and posts the error to the DDE frame DDE-ERROR attribute. If you specify NO-ERROR, the statement does not set the Progress error condition, but does post the error to the DDE frame.

> Example

> The following fragment shows a typical use of the DDE SEND 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 Progress 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 using the DDE SEND statement.

>     DEFINE VARIABLE Sheet1 AS INTEGER.        /* DDE-ID to worksheet topic */
>     DEFINE VARIABLE DDEframe AS WIDGET-HANDLE./* DDE frame handle          */

>     CREATE FRAME DDEframe.                    /* Create DDE frame.         */
>                            .
>                            .
>                            .
>     /* 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".
>                            .
>                            .
>                            .

> #### Note

> For more information on using the DDE protocol to exchange data with non-OpenEdge applications, see OpenEdge Development: Programming Interfaces .

> #### See also

> DDE INITIATE statement

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095