23

Is possible delete all the records from a TClientDataset at once?

Fabrizio
  • 7,603
  • 6
  • 44
  • 104
Salvador
  • 16,132
  • 33
  • 143
  • 245

1 Answers1

46

Yes it is possible, you must use the EmptyDataSet procedure.

try this

 ClientDataSet1.DisableControls;
 try
   ClientDataSet1.EmptyDataSet;
 finally
   ClientDataSet1.EnableControls;
 end;
GolezTrol
  • 114,394
  • 18
  • 182
  • 210
RRUZ
  • 134,889
  • 20
  • 356
  • 483