EntityDAC

Using Professional Edition

EntityDAC Professional edition includes the most complete set of components that allows to solve the considered task in even more simple way.

Step 1

Open the main form in the form designer and delete MasterDataSet and DetailDataSet. Instead, put two TEntityTable components on the form, naming them MasterTable and DetailTable correspondingly.

Step 2

Link MasterDataSource to MasterTable and DetailDataSource to DetailTable. Then set the MasterTable.TypeName to Dept and DetailTable.TypeName to Emp. Also, set up the master-detail relationship between MasterTable and DetailTable.

Step 3

Modify the Button1.OnClick event handler. Remove all inner code except opening datasets.

procedure TDemoMainForm.Button1Click(Sender: TObject);
begin
  DetailTable.Open;
  MasterTable.Open;
end;

Compile and run the project, and press the “Open" button.

© 1997-2017 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback