access 日期字段 update时不对
现在又出现一个问题,就是在修改记录进行更新时,出错了,语句如下:
string sSQL = "update buy set 进货日期='"+buydateTimePicker.Value.ToString("yyyy-MM-dd")+"', set 进货店='"+buyshoptextBox.Text+"' where 编号="+IDhao;
在语句处cmdresults = OleDbCommand1.ExecuteNonQuery();出现绿色。
若把更新日期的字段去掉,正常。如下:
string sSQL = "update buy set 进货店='"+buyshoptextBox.Text+"' where 编号="+IDhao;
为什么呢?