SqlDateTime 溢出
我在sql里定义时间为默认值getdate()在.net里做插入的时候还要不要插入数据啊!
如果要插入数据,语句应该怎么写,我没有插入,结果是SqlDateTime 溢出
public class LW_BLL
{
KD_DALTableAdapters.leave_wordTableAdapter LW = new leave_wordTableAdapter();
public KD_DAL.leave_wordDataTable GetLW()
{
return LW.GetData();
}
public bool InsertLW(string lw_customer, string lw_content)
{
if (lw_customer == null)
{
lw_customer = "游客";
}
LW.InsertLW(lw_customer, lw_content);
return true;
}
} --------------------编程问答-------------------- 不插入时间是会报错的原因是datetime没有null值可以使用Datetime?可空类型
补充:.NET技术 , ASP.NET