Jacek Laskowski 57 Posted November 23, 2020 (edited) Firedac datasets have the method DestDataset.CloneCursor (SrcDataset : TFDDataset...), which clones the cursor from the dataset given as a parameter. After performing this method internally both datasets have the same buffer with records. Is there any way to reverse/cancel the result of this method, i.e. break the links to the "foreign" buffer and recreate the original cursor/buffer? I mean especially TFDMemTable. Edited November 23, 2020 by Jacek Laskowski Share this post Link to post
Lachlan Gemmell 33 Posted November 23, 2020 Take a look at TFDMemTable.Data. It doesn't do exactly what you want but it's close. Share this post Link to post
Guest Posted November 24, 2020 (edited) 11 horas atrás, Jacek Laskowski disse: Os conjuntos de dados Firedac têm o método DestDataset.CloneCursor (SrcDataset: TFDDataset ...), que clona o cursor do conjunto de dados fornecido como parâmetro. Depois de executar este método internamente, os dois conjuntos de dados têm o mesmo buffer com registros. Existe alguma maneira de reverter / cancelar o resultado deste método, ou seja, quebrar os links para o buffer "externo" e recriar o cursor / buffer original? Quero dizer especialmente TFDMemTable. este procedimento pode fazer o trabalho mais rápido: // ... a estrutura deve ser a mesma no final !!! FDQuery1.AttachTable (FDMemTable1.Table, nil); FDTable1.AttachTable (FDMemTable1.Table, nil); FDMemTable1.AttachTable (FDMemTable1.Table, nil); ... talvez um FDQuery1. "CLOSE" pode ajudá-lo, a começar um novo anexo look at: unit FireDAC.Comp.DataSet.pas, line 7322 and see "AttachTable in use" by "CloneCursor" veja se te ajuda! abraço Edited November 24, 2020 by Guest Share this post Link to post