Stéphane Wierzbicki 45 Posted September 8, 2019 Hello, Does anyone know how to store a TFDMemtable with its indexes? TFDMemtable.SaveToFile does not save indexes, I tried different formats ( sfXM,sfBinary,sfJSON). I've also tried to either add indexes with TFDMemtable.IndexDefs or with TFDMemtable.Indexes. StoreItems is set to [siData, siDelta, siMeta]. I'm clueless. Any idea? Share this post Link to post
Stéphane Wierzbicki 45 Posted September 10, 2019 @Dmitry Arefiev do you know maybe a workaround? Share this post Link to post
Uwe Raabe 2057 Posted September 10, 2019 AFAIK, IndexDefs (as well as FieldDefs) are stored in the DFM when StoreDefs is True, but I guess they are not part of the data file. Share this post Link to post
Stéphane Wierzbicki 45 Posted September 10, 2019 @Uwe Raabe this could be an explanation but this can't be the reason why they are not stored (BTW FieldDefs are stored in the saved file). The only solution I'm thinking to is to create a separate list that will hold indexes information. This is cumbersome as this could be done with the TFDMemTabble.SaveToFile method. Share this post Link to post
Bill Meyer 337 Posted September 10, 2019 For reasons I have never understood, the TDataset and its descendants stream data, but not properties. In my own work, I have had to deal with this in connection with the field properties we wish to pass to reporting code. It is all very nice to have Alignment, DisplayFormat, and DisplayLabel, but rather annoying that there is no option to include them in streaming. Share this post Link to post
Stéphane Wierzbicki 45 Posted September 10, 2019 Looks like a feature request to put on quality central... Share this post Link to post