Syntax 1 For single DDE requests
Description
Asks a DDE server application to provide data and stores that
data in the specified variable without requiring an open channel.
This syntax is appropriate when you will make only one or two requests
of the server.
Syntax
|
1 |
<span>GetRemote </span>( <span>location</span>, <span>target</span>, <span>applname</span>, <span>topicname</span> {, <span>bAnsi</span>} ) |
|
Argument |
Description |
|---|---|
|
location |
A string whose value is the location |
|
target |
A string variable into which the returned |
|
applname |
A string whose value is the DDE name |
|
topicname |
A string identifying the data or the |
|
bAnsi |
A boolean identifying whether the string |
Return Values
Integer. Returns 1 if it succeeds and
a negative integer if an error occurs. Values are:
-
-1 Link was not started
-
-2 Request denied
If any argument’s value is null, GetRemote returns null.
Usage
When using DDE, your PowerBuilder application must have an
open window, which will be the client window. For this syntax, the
active window is the DDE client window.
For more information about DDE channels and
warm and cold links, see the two syntaxes of the ExecRemote function.
Examples
These statements ask Microsoft Excel to get the data
in row 1 column 2 of a worksheet called PROFIT.XLS and
put it in a PowerBuilder string called ls_ProfData.
The single GetRemote call establishes a cold
link, gets the data, and ends the link:
|
1 |
string ls_ProfData<br><span>GetRemote</span>("R1C2", ls_ProfData, &<br>   "Excel", "PROFIT.XLS") |