Query1.Close;
Query1.Sql.Clear;
Query1.Sql.Add('Delete  from Task where FIM_Code =' + QuotedStr(FIM_Code));
Query1.ExecSQL;报错:query1: can not perform this operation on a closed dataset.
delphi带的例子也就这么做的啊。另外,如果用
  Query1.Close;
  Query1.Sql.Clear;
  Query1.Sql.Add('Select * from Task where FIM_Code =' + QuotedStr(FIM_Code));  with Query1 do begin
    First;
    while not eof do begin
      Delete;
    end;
  end;
报错:can not perform the edit because another user changed the record.
但是就我一个人用啊!
  Query1.ExecSQL;