I use Delphi XE3 / DataSnap with Firedac
When I write the parent table on the server I want to retrieve the value that was added via auto increment in the parent so that I can enter this new value in the foreign key in the child table.
I do not know where to pick it and how to pick it up if it can be what event.
...AfterUpdateRecord(Sender: TObject;
SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind);
or
...BeforeUpdateRecord(Sender: TObject;
SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind;
var Applied: Boolean);