DDE REQUEST statement
- Last Updated: January 18, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
(Windows only)
Retrieves the current value of a dynamic data exchange (DDE) server data item associated with the specified DDE conversation.
This statement is supported only for backward compatibility. Use the Component Object Model (COM) instead.
Syntax
|
- 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 INITIATEstatement that opened the conversation. - TARGET field
- Specifies a character field or variable that receives the value of the data item as a character string.
- ITEM name
- Specifies the name of the server data item from which to retrieve a 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 ABL client waits for
the
DDE REQUESTstatement to complete, where seconds is an integer expression. If you do not specify theTIMEoption or specify a value of 0, the AVM waits indefinitely for the statement to complete. - NO-ERROR
- The NO-ERROR option is used to prevent the statement from raising
ERRORand displaying error messages.Regardless of whether
NO-ERRORis used, the AVM posts the error to the DDE frameDDE-ERRORattribute.
Example
The following fragment shows a typical use of the DDE
REQUEST 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 builds 10 new Customer records from data
obtained from the first 4 columns in the worksheet using the DDE REQUEST
statement. The data includes Customer name, year-to-date sales, state, and zip code. (The
requests start from row 2, because row 1 contains column headings.)
|
Note
For more information on using the DDE protocol to exchange data with non-ABL applications, see OpenEdge Programming Interfaces.