tags:

views:

156

answers:

1

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

+12  A: 

Yes is possible, you must use the EmptyDataSet procedure.

try this

   ClientDataSet1.DisableControls;
 try
   ClientDataSet1.EmptyDataSet;
 finally
   ClientDataSet1.EnableControls;
 end;
RRUZ
DisableControls / EnableControls are not needed in this case.
oodesigner
True but then the next question becomes: *"how do I speed up clearing a Clientdataset?"*
Lieven