我在dal层中遇到错误您能回答这个问题吗 [英] i got an error in dal layer can u plese answer the question
本文介绍了我在dal层中遇到错误您能回答这个问题吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SqlDateTime溢出.必须在1/1/1753 12:00:00 AM和12/31/9999 11:59:59 PM之间.
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
推荐答案
错误说明了一切.检查要插入到数据库中的DateTime对象的值.可能将其设置为最小值 [最大值 [
The error says it all. Check the value of the DateTime object that you are inserting to the database. Its possible that is set to the minimum [^]in .net, which is 01/01/0001, or maximum[^], 01/01/10000. However, SqlDateTime only accepts DateTimes that ranges between the error you posted.
您指定的日期时间应在指定的范围内.
您输入的日期是错误的,并且超出了此范围,因此SQL无法处理.请参见MSDN链接-日期时间(Transact-SQL) [
The date time you specified should be between the specified range.
The date that you have entered is wrong and goes beyond this range and cannot be handled by SQL. See the MSDN link - datetime (Transact-SQL)[^].
Put a debugger and see what date is being passed to the SQL server and you will find the issue.
这篇关于我在dal层中遇到错误您能回答这个问题吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文