I am trying to replace Delphi ClientDatasets That worked fine but just very slow on large data with Firedac MemoryTables I create a FireDac Memory Table in a data module and populate it from a form. In the Form I check the record count of the Memory Table and it contains records. I then close the memory table and reopen it but it returns an empty table after opening.
Dataform.mtDebTran.FileName := CdsDir + '/DebTran.Fds';
DataForm.mtDebTran.CreateDataSet
DataForm.mtDebTran.CreateDataSet;
DataForm.mtDebTran.Open;
DataForm.BuildDebTranTemp1(P1,P2,P3,P4,True,True);
DataForm.mtDebTran.SaveToFile(CdsDir + '/DebTran',sfBinary);
ShowMessage(IntToStr(DataForm.mtDebTran.RecordCount));
DataForm.mtDebTran.Close;
DataForm.mtDebTran.Open;
ShowMessage(IntToStr(DataForm.mtDebTran.RecordCount));`