We have situations where the detail dataset is not being refreshed when data is posted to the master dataset. Here is a sample setup we have:
procedure TForm1.FormCreate(Sender: TObject);
var
Master: TOraTable;
Detail: TOraQuery;
MasterSource: TDataSource;
begin
// Master Dataset
Master := TOraTable.Create(Self);
Master.Session := Data.MainData;
Master.TableName := 'Loads';
Master.KeyFields := 'LoadNo';
Master.OrderFields := 'LoadNo';
//Detail Dataset
Detail := TOraQuery.Create(Self);
Detail.Session := Data.MainData;
Detail.SQL.Text := 'Select * from Loads where LoadNo = :LoadNo';
MasterSource := TDataSource.Create(Self);
MasterSource.DataSet := Master;
Detail.MasterSource := MasterSource;
Master.Open;
Detail.Open;
end;
The problem we are seeing is that when we post inserts/updates to the Master TOraTable, we are not seeing the updates in the Detail TOraQuery. Even refreshing the Master data does not refresh the Detail data. We are having to add a Detail.Refresh; call. Is there a setting we are missing that will automatically refresh the detail data after the Master data is posted?
end;