Solved

DDE, MS Access send request to Delphi App want response.

Posted on 2004-08-11
4
209 Views
Last Modified: 2010-04-05
Well Hello Again,

I know I should be using OLE or COM but I don't know how, and at the moment don't have time to fit the learning in.  So here's my teaser.

I want to send a DDE message from Access to my Delphi App and receive a response back in Access.  How do I do that?  If I use DDEExecute then Access only receives notification from my app that the data was received successfully.  DDEPoke does'nt work.

I want to send a request saying 'are you busy', I want my Delphi App to respond.  My Access App can then send a second DDE command depending on the result.

As always help is mucho appreciated.

Regards

Sean
0
Comment
Question by:seancaddell
4 Comments
 

Author Comment

by:seancaddell
ID: 11782315
I found Solution after a bit more POKING around and a good nights sleep.

Using the following code in Access.

Private Sub Command0_Click()
  chan = DDEInitiate("myapp", "DDEServer")   'exe name, Name of DDEServerConv in my Delphi App
  Text1.SetFocus
  Cmd = "Run=" + Text1.Text
  Tpc = "DDETopic"       ' name of DDEServerItem in my Delphi App
  DDEPoke chan, Tpc, CMd
  Text5.SetFocus
  Text5.Text = CMd
  Text3.SetFocus
  Text3.Text = DDERequest(chan, Tpc)
 

  DDETerminateAll
End Sub



In Delphi the following code:

procedure TForm1.DDETopicPokeData(Sender: TObject);
begin
  If not processing then DDETopic.Text := 'YES'
  else
    DDETopic.Text := 'NO';
end;

0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13404423
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now