DetailDelay - bug

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
malinsky
Posts: 32
Joined: Wed 20 Aug 2008 11:38

DetailDelay - bug

Post by malinsky » 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

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

Post by Plash » Mon 02 Mar 2009 08:14

Thank you for the information. We'll add a fix for this problem in the next UniDAC build.

Post Reply