Skip to content

Instantly share code, notes, and snippets.

@reinaldoacdc
Created March 14, 2022 18:01
Show Gist options
  • Save reinaldoacdc/aca5ebc481e6267ab856c2b7cf708a7b to your computer and use it in GitHub Desktop.
Save reinaldoacdc/aca5ebc481e6267ab856c2b7cf708a7b to your computer and use it in GitHub Desktop.
unit ClientDataSetHelper;
interface
uses DbClient;
type TClientDataSetHelper = class helper for TClientDataSet
procedure InitializeDataSet;
end;
implementation
procedure TClientDataSetHelper.InitializeDataSet;
begin
if Self.Active then
Self.EmptyDataSet
else
Self.CreateDataSet;
end;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment