Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
System restore point 4 91
Copy file in dll not working but working on exe ! 18 87
How to renew a Delphi rad-studio licence? 5 49
Delphi and Access based Enumeration 9 44
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
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.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

10 Experts available now in Live!

Get 1:1 Help Now