delphitclientdataset

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


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


Solution

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

    try this

     ClientDataSet1.DisableControls;
     try
       ClientDataSet1.EmptyDataSet;
     finally
       ClientDataSet1.EnableControls;
     end;