Initiates and controls a DDE link between dBASE Plus and a server application, allowing dBASE Plus to send instructions and data-exchange requests to the server.

Syntax

[<oRef> =] new DDELink( )

<oRef>

A variable or property in which to store a reference to the newly created DDELink object.

Properties

The following tables list the properties, events, and methods of the DDELink class.

Property

Default

Description

baseClassName

DDELINK

Identifies the object as an instance of the DDELink class

className

(DDELINK)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

server

 

The name of the server you specified with the initiate( ) method

timeout

1000

Determines the amount of time in milliseconds that dBASE Plus waits for a transaction before returning an error

topic

 

The name of the topic you specified with the initiate( ) method

 

Event

Parameters

Description

onNewValue

<item expC>,
<value expC>

When an item in the server application changes

 

Method

Parameters

Description

advise( )

<item expC>

Requests that the server notify the client when the item in the server changes

execute( )

<cmd expC>

Sends instructions to the server in its own language

initiate( )

<server expC>,
<topic expC>

Starts a conversation with a DDE server application

peek( )

<item expC>

Retrieves a data item stored by the server

poke( )

<item expC>,
<value exp>

Sends a data item to the server

reconnect( )

 

Restores a DDE link that was terminated with terminate( )

release( )

 

Explicitly removes the DDELink object from memory

terminate( )

 

Terminates the link with the server application

unadvise( )

<item expC>

Asks the server to stop notifying the DDELink object when an item in the server changes

Description

Use a DDELink object to open a channel of communication (known as a DDE link) between dBASE Plus and an external Windows application (known as a server).

You can exchange data and instructions through this link, making the two applications work together. For example, you could use a DDELink object to open, send data to, format and print a document in your word processor, or open a spreadsheet and then exchange and update table data. You can also run separate dBASE Plus sessions and use one as a DDE client and the other as a server (as shown in the class DDELink and class DDETopic examples).

A DDE link is established with the initiate( ) method. If the server application isn’t already running, initiate( ) attempts to start it. If the link attempt is unsuccessful, initiate( ) returns false.