Page 1 of 1

DetailDelay - bug

Posted: Sat 28 Feb 2009 16:02
by malinsky
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

Posted: Mon 02 Mar 2009 08:14
by Plash
Thank you for the information. We'll add a fix for this problem in the next UniDAC build.