| View previous topic :: View next topic |
| Author |
Message |
m68_1
Joined: 22 Oct 2009 Posts: 2
|
Posted: Thu Oct 22, 2009 6:20 am Post subject: syntax question on dde request |
|
|
hi everyone,
I need to get data from a DDE server (it is a software called futuresource, one of the eSignals products)
this is the syntax I use in excel and it works:
=FSDDE|Quote!'fld:"GC Z9".Ask'
i am trying to do the same in java and this is the java code I have
DdeClient cl = new DdeClient();
cl.connect("FSDDE","QUOTE");
String item = "'fld:\"GC Z9\".Ask'";
byte [] d = cl.request(item,DdeUtil.CF_TEXT,1000);
and it gives me an error:
Error parsing link 'fld:'GC Z9'.Ask'
note, somehow in the error message, it changes double quotes from item variable into single quotes
can anyone shed some light? thanks in advance.
Mike |
|
| Back to top |
|
 |
ken

Joined: 25 Mar 2004 Posts: 634
|
Posted: Thu Oct 22, 2009 6:57 am Post subject: |
|
|
| Have you tried String item = "fld:\"GC Z9\".Ask" ? No single quotes |
|
| Back to top |
|
 |
m68_1
Joined: 22 Oct 2009 Posts: 2
|
Posted: Thu Oct 22, 2009 7:14 am Post subject: |
|
|
| ken wrote: | | Have you tried String item = "fld:\"GC Z9\".Ask" ? No single quotes |
yes i did, no luck. |
|
| Back to top |
|
 |
ken

Joined: 25 Mar 2004 Posts: 634
|
Posted: Thu Oct 22, 2009 1:11 pm Post subject: |
|
|
| I would also try removing all quotes. Or even "GC Z9,Ask". Finally,I would check FS DDE manual. |
|
| Back to top |
|
 |
jct
Joined: 11 Nov 2009 Posts: 1
|
Posted: Wed Nov 11, 2009 6:16 pm Post subject: |
|
|
Mike,
Did you ever figure out the correct syntax? I'm trying to do the same with VB and can't get the DDERequest formatting down.
Like you, I've tried many combinations of single and double quotes and removed various parts of the text which appear in the Excel cell.
Having a difficult time getting help from eSignal on it.
John |
|
| Back to top |
|
 |
|