stringGrid中有一列数据是日期格式"2005-2-2"的,SQL server 中对应的字段"TestDate"是DateTime型的,执行以下代码时出现."IS not valid Date"错误 for j := 1 to  StringGrid1.RowCount do
  begin
      table.Open;
      table.Append;
        table.FieldByName('TestDate').AsDateTime := StrToDate(Trim(StringGrid1.Cells[0,3*j-2]));
          table.UpdateBatch();
     end;
但是把字段"TestDate"改为char(10)则成功添加到表中,究竟是什么回事?正确代码怎么改?