Hi,
I've got the same problem.
Database : Firebird 4.0
Components : TSQLConnector, TSQLTransaction, TSQLQuery.
Master Query and DetailQuery are linked by Datasource.
Displaying records id ok.
But when I insert more detail records for the same master record, only one is there when I reopen the form.
The same if I insert a new master record then a new detail (first master.post of course), the master is inserted into the database but the detail not.
Thanks.
procedure TProductW.SalesQueryNewRecord(DataSet: TDataSet);
begin
Dataset.FieldByName('serprd').Value:=Query.FieldByName('serprd').AsInteger;
Dataset.FieldByName('dateff').Value:= Validity.Date;
Dataset.FieldByName('ptype').Value:='S';
Dataset.FieldByName('qtymin').Value:=1;
end;
procedure TProductW.saveContent;
begin
try
if DataObject.Transaction.Active then
begin
Query.ApplyUpdates;
SalesQuery.ApplyUpdates;
DataObject.Transaction.Commit;
end;
except
on E:EDatabaseError do
begin
DataObject.Transaction.Rollback;
MessageDlg(E.Message, mtError, [mbOk], 0);
end;
end;
end;
[code=pascal]