Jump to content
Jacek Laskowski

Reversing from CloneCursor method

Recommended Posts

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 by Jacek Laskowski

Share this post


Link to post
Guest
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 by Guest

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×