Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

820 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