DetailDelay - bug
Posted: Sat 28 Feb 2009 16:02
Hallo,
please repair an error (quit surely) when CustomDADataSet.RefreshDetail() is coming in the moment when the dataset is closed (for example if the extremely long delay is set and the dataset is closed earlier than RefreshDetail is comming).
The message "Cannot perform this operation on a closed dataset" apears.
My temporary and working solution( marked "added by PMal"):
DBAccess.pas
procedure TCustomDADataSet.RefreshDetail(Sender: TObject);
var
MessageID: cardinal;
begin
{$IFDEF MSWINDOWS}
if FDetailRefreshTimer nil then
FDetailRefreshTimer.Enabled := False;
{$ENDIF}
//added by PMal
if not Active then // <<< --- test if active
Exit;
//end by PMal
if FOptions.LocalMasterDetail then begin
FIRecordSet.FilterUpdated;
Resync([]);
First;
end
else begin
[...]
end;
Thanks, Pavel
please repair an error (quit surely) when CustomDADataSet.RefreshDetail() is coming in the moment when the dataset is closed (for example if the extremely long delay is set and the dataset is closed earlier than RefreshDetail is comming).
The message "Cannot perform this operation on a closed dataset" apears.
My temporary and working solution( marked "added by PMal"):
DBAccess.pas
procedure TCustomDADataSet.RefreshDetail(Sender: TObject);
var
MessageID: cardinal;
begin
{$IFDEF MSWINDOWS}
if FDetailRefreshTimer nil then
FDetailRefreshTimer.Enabled := False;
{$ENDIF}
//added by PMal
if not Active then // <<< --- test if active
Exit;
//end by PMal
if FOptions.LocalMasterDetail then begin
FIRecordSet.FilterUpdated;
Resync([]);
First;
end
else begin
[...]
end;
Thanks, Pavel