DateTime issue in SQL Server

后端 未结 5 840
我在风中等你
我在风中等你 2021-01-18 22:08

I\'m trying to do an INSERT into an already set DB in MS SQL Server, the DB server is in a shared hosting (godaddy).

And what i\'m trying to achieve is to store an a

5条回答
  •  梦毁少年i
    2021-01-18 22:39

    I would assume that Servicios has DateTime property which is not being set.

    DateTimes are not nullable, and when they're not set, they default to {1/1/0001 12:00:00 AM}.

    Upon calling db.SubmitChanges(), you're attempting to insert a value into a DateTime column which is a lower value that SQL SERVER supports as seen in your exception.

    SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

提交回复
热议问题