如题:
   ClientDataSet中的数据不是来自数据库,希望把它清空,然后重新insert。
   我这样写的:
 if CDS.RecordCount<>0 then
 begin 
      CDS.First;
      while not CDS.Eof do
      begin
           for n:=0 to CDS.FieldCount-1 do
                CDS.Fields[n].Value := '';
           CDS.Next;
      end;
 end;
我在前面加open或close都不对,到底该怎样写?