Master-Detail relation broken in 6.6.2 REV270
Posted: 13.08.2007, 21:49
Hello!
In my projects, I always do the master-detail relation using the dataset property, and then writing the SQL of detail query with parameters.
For my surprise, when I've installed the REV270 and then compiled my project, everytime I append a new record to the master table, the detail don't refresh it's contents. Then I rollback to 6.6.1 where everything works OK.
Looking deep to the code, the problem occurs in the line 1961 of ZAbstractRODataset, where the function RefreshParams was modified:
The problem-line is:
if DataSet.Active and not (DataSet.State in [dsSetKey, dsEdit, dsInsert]) then
where dsEdit and dsInsert are now states that refresh will not execute. They don't exist in 6.6.1 and if I remove then, my master-detail relation works again.
My questions: Who has added this options? for what ? would this person suggest a workarround in the case query is master of another?
thanks!!
In my projects, I always do the master-detail relation using the dataset property, and then writing the SQL of detail query with parameters.
For my surprise, when I've installed the REV270 and then compiled my project, everytime I append a new record to the master table, the detail don't refresh it's contents. Then I rollback to 6.6.1 where everything works OK.
Looking deep to the code, the problem occurs in the line 1961 of ZAbstractRODataset, where the function RefreshParams was modified:
Code: Select all
{**
Refreshes parameters and reopens the dataset.
}
procedure TZAbstractRODataset.RefreshParams;
var
DataSet: TDataSet;
begin
DisableControls;
try
if FDataLink.DataSource <> nil then
begin
DataSet := FDataLink.DataSource.DataSet;
if DataSet <> nil then
if DataSet.Active and not (DataSet.State in [dsSetKey, dsEdit, dsInsert]) then
begin
Refresh;
end;
end;
finally
EnableControls;
end;
end;
if DataSet.Active and not (DataSet.State in [dsSetKey, dsEdit, dsInsert]) then
where dsEdit and dsInsert are now states that refresh will not execute. They don't exist in 6.6.1 and if I remove then, my master-detail relation works again.
My questions: Who has added this options? for what ? would this person suggest a workarround in the case query is master of another?
thanks!!