I've been using this piece of code I've written and it's working in this most unclear manner. I wish to insert a row into the database which includes two columns of DateTime:
myrow.ApprovalDate = DateTime.Now
myrow.ProposedDate = DateTime.Now
And yet, when I update the database I receive this error:
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
I've even tried copying an inserted value from the database and hard code it into the object being updated:
// I copied this value from the DB
myrow.ApprovalDate = Convert.ToDateTime("2008-12-24 00:00:00.000");
Still same error, the strange part is that the above trick worked for the first insert to the DB but failed from there on. Any ideas what's going on?