1

I am working with a simple client server application using EMS(i.e: for future iOS application) in Delphi.

This question is the continuation of my previous question with a different error.

This is my previous question with different problem from which I have followed the suggestion given by Marco.

Problem: Now I have an error when I am passing parameter from client to server.

Project EMS_Test_Client_Project.exe raised exception class EFDException with message '[FireDAC][Comp][DS]-206. Cannot open dataset [FDMemTable]. A DataTable or a DataView must be supplied. Hint: if that is TFDMemTable, use CreateDataSet or CloneCursor to open dataset'.

Hereby I have an Image1 of TFDMemTable properties (DatSTableName: QRowParam) with Param, which throws an error.

Problem TFDMemTable

Hereby I have an Image2 of TFDMemTable properties (DatSTableName: QRows) without Param, which works.

Working TFDMemTable

Question: If I am using general call from client to server, it works and I got all the data. In which I have used Image2 TFDMemTable without param TFDQuery. But if I am passing a parameter from client to server, then I got an error on the client side in which I have used Image1 TFDMemTable with param TFDQuery.

Can anyone suggest me, how should I proceed further from this issue?

Thanks in advance.

Community
  • 1
  • 1
A_R
  • 109
  • 2
  • 12
  • 1
    Setting `Active` property to true on your `TFDMemTable` component should create the necessary memory table dataset at design time (as that is what the exception is asking for). – TLama Oct 29 '14 at 13:10
  • @TLama after setting the Active property to true on TFDMemTable component also I got the same error! Any other suggestions? – A_R Oct 31 '14 at 09:25
  • Sorry, no other clues. I've never worked with adapters. It was just my immediate reaction for the exception you've posted. – TLama Oct 31 '14 at 09:28

1 Answers1

1

I suggest to have a look to the EMS / FireDAC demo that ships with the product. On the client, if you don't have data you cannot open the in-memory datasets. To open them at design time you can create a "template" structure for design, matching the actual fields structure.

Marco Cantù
  • 1,195
  • 7
  • 13
  • I am following these [EMS Client Pet docwiki link](http://docwiki.embarcadero.com/RADStudio/XE7/en/Creating_the_EMS_Pets_Client) and [EMS Resource Pet docwiki link](http://docwiki.embarcadero.com/RADStudio/XE7/en/Creating_the_EMS_Pets_Resource#Creating_the_Pet_Type) till now but it's without FireDAC. Could you please kindly give me the link for **EMS/FireDAC demo that ships with the product?** I couldn't find it. Thanks in advance. – A_R Nov 06 '14 at 13:58
  • 1
    Look under the demos, Object Pascal / Database / EMS and there is a FireDAC demo – Marco Cantù Nov 10 '14 at 17:10
  • Finally I have managed to communicate through parameter between a client and a server. Thanks for your suggestions. You are the only person helps me for Delphi and EMS kind of questions :) – A_R Nov 19 '14 at 16:19