Possible Duplicate:
Linq To Sql - SQL Default Constraint Problem
My database table as a column called date_created
defined as follows:
date_created DATETIME NOT NULL DEFAULT GETDATE()
I'm using Linq-to-SQL classes. I create a new object, populate it (omitting a value for date_created
as that's supposed to sort itself out) and as soon as I call SubmitChanges
it returns an error:
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
Any idea why? Thanks
date_created = DateTime.Now;
in your code... – marc_s Nov 12 '12 at 9:56DateTime.MinValue
which would be causing it to throw the error – V4Vendetta Nov 12 '12 at 9:59