How can I delete all the records from a TClientDataset at once?
Asked Answered
D

1

23

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

Diffuse answered 24/10, 2010 at 1:33 Comment(0)
A
46

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

try this

 ClientDataSet1.DisableControls;
 try
   ClientDataSet1.EmptyDataSet;
 finally
   ClientDataSet1.EnableControls;
 end;
Accompaniment answered 24/10, 2010 at 1:41 Comment(2)
DisableControls / EnableControls are not needed in this case.Inamorato
True but then the next question becomes: "how do I speed up clearing a Clientdataset?"Cortney

© 2022 - 2024 — McMap. All rights reserved.