FireDAC.Comp.DataSet.TFDMasterDataLink.Synchronize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Synchronize(AWithDetails: Boolean = True);

C++

void __fastcall Synchronize(bool AWithDetails = true);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDMasterDataLink

Description

Synchronizes the detail dataset with the master dataset.

Call the Synchronize method to synchronize the detail dataset that has not been yet refreshed with the master dataset. The method is useful when delayed refreshing is in effect (FetchOptions.DetailDelay is greater than 0) or when refreshing is disabled (DisableScroll). 

Optionally, you can use DisableDelayedScroll / EnableDelayedScroll to temporary disable / enable the delayed refreshing.

Example

qMaster.First;
while not qMaster.Eof do begin
  if qMaster.Fields[i].AsInteger = 100 then begin
    qDetail.MasterLink.Synchronize(True);
    // read qDetail dataset - here it is synchronized with qMaster
  end;
  qMaster.Next;
end;

See Also