Master-Detail (TOraTable-TOraQuery) refresh issues

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mikeho
Posts: 41
Joined: Thu 11 Nov 2004 21:23
Location: Middle Tennessee USA

Master-Detail (TOraTable-TOraQuery) refresh issues

Post by mikeho » Tue 28 Jul 2009 16:45

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;

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 03 Aug 2009 07:58

There is no such feature. You should refresh the detail dataset manually.

mikeho
Posts: 41
Joined: Thu 11 Nov 2004 21:23
Location: Middle Tennessee USA

Post by mikeho » Mon 03 Aug 2009 20:01

So what you are saying is that Refreshing the master record will not also refresh the details?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 04 Aug 2009 08:50

Yes, the detail dataset is not refreshed when you refresh the master.

mikeho
Posts: 41
Joined: Thu 11 Nov 2004 21:23
Location: Middle Tennessee USA

Post by mikeho » Tue 04 Aug 2009 17:11

Then I would like to make a formal request that Devart add an auto refresh for the details when a master is refreshed. The old BDE type tables/queries had this built in - any refresh to a master table would also refresh all the detail tables/queries.

Post Reply