Delphi - Change Fields definitions of a TClientDataSet that has data
问题 I'm creating FieldDefs at runtime for a TClientDataSet . Still at runtime I want to remove all FieldDefs . I'm saving TClientDataSet physically to a disc file. I tried removing existing FieldDefs using the following code so I could add new ones. But it didn't work: with fDataSet do begin Active := False; DisableControls; FieldDefs.Clear; Fields.Clear; EnableControls; end; After executing this code, FieldDefs and Fields count are 0 , but if I close and reopen the disc file , FieldDefs and