DDE GET statement
- Last Updated: July 20, 2021
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
(Windows only)
Retrieves the value of a dynamic data exchange (DDE) server data item that
has changed and triggered a DDE-NOTIFY event.
This statement is supported only for backward compatibility. Use the Component Object Model (COM) instead.
Syntax
|
- ddeid
- An integer expression that specifies the channel number of the
conversation that triggered the
DDE-NOTIFYevent. You can obtain the value of ddeid from theDDE-IDattribute of the frame to which theDDE-NOTIFYevent was posted. - TARGET field
- Specifies a character field or variable that receives the value of the server data item as a character string.
- ITEM name
- Specifies the server data item that changed and triggered the
DDE-NOTIFYevent, where name is a character expression that identifies the name of the data item in the server application. You can obtain the value of name from theDDE-ITEMattribute of the frame to which theDDE-NOTIFYevent was posted. - TIME seconds
- Specifies the maximum number of seconds that the ABL client waits for
the
DDE GETstatement 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 how to use the DDE GET
statement to set up a procedure to capture a rate-of-change value as it changes in a dynamic
model run in a Microsoft Excel worksheet. The example assumes that the Microsoft Excel
application is running, and has opened the default Excel worksheet, Sheet1, which runs the
model.
After the conversation is opened, the DDE ADVISE statement
links to the worksheet cell that maintains the latest rate-of-change value (2nd column of
the 4th row, or R4C2). Every time this cell changes value, the AVM posts a
DDE-NOTIFY event to the frame DDEframe, where the value is retrieved
using the DDE GET statement, and stored as a decimal in the ChangeRate variable. Meanwhile, if the REPEAT
block detects a ChangeRate value greater than 7.5%, the the
link to cell R4C2 is closed and the procedure continues.
|
Notes
- The AVM posts each
DDE-NOTIFYevent to the frame that owns the conversation opened for the linked data item. - You can invoke this function in the trigger block for each frame that
owns a conversation containing advise links. Only frames that own conversations linked to
data items with the
DDE ADVISEstatement can receiveDDE-NOTIFYevents. - For more information on using the DDE protocol to exchange data with non-ABL applications, see OpenEdge Programming Interfaces.
See also
DDE ADVISE statement, DDE INITIATE statement, NO-ERROR option