TFDMemTable a better alternative to TClientDataset in Delphi
TFDMemTable FDMemTable is FireDAC dataset component that supports in memory table functionality. By using FDMemTable we can store data in a table format in local memory. We don’t need any database connection for this. We just need to add fields with definitions. Then we can create the table and add, edit, delete records. If we are only using FireDAC, then FDMemTable should be used only when we have memory-only data. And also in some special cases; for example, you can load CSV file into FDMemTable, then use LocalSQL to query this CSV data. Lets create the in-memory dataset. Var FDMemTable1 : TFDMemTable; ……….. with FDMemTable1.FieldDefs do begin Add(‘EmpID’, ftInteger, 0, True); Add(‘EmpName’, ftString, 50, False); CreateDataset; Open; end; Or with FDMemTable1.FieldDefs.AddFieldDef do begin Name := 'EmpID'; DataType := ftInteger; Required := True; ...