Code: Select all
procedure TDMGeneral.DataModuleDestroy(Sender: TObject);
var
i : integer;
s : String;
begin
Try
for i:=0 to ComponentCount-1 do
begin
if (Components[i] is tZQuery) then
begin
try
s:= Components[i].Name;
(Components[i] as tZQuery).Close;
finally
s:= Components[i].Name;
end;
end
else if (Components[i] is tZReadOnlyQuery) then
begin
try
s:= Components[i].Name;
(Components[i] as tZReadOnlyQuery).Close;
finally
s:= Components[i].Name;
end;
end;
end;
Except
Raise;
End;
end;
Regards,
Rich