Solved

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

Posted on 2004-08-11
4
206 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 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