views:

92

answers:

3

This is a slightly odd problem, which means the solution is probably something trivial that im just missing.

I have SQLServer 2008 developer on my local. I was using the Date type, and then realized godaddy uses 2005 which Only supports datetime. Im using LINQ, so I just changed to a datetime on the database side and changed the server data type in the dbml to DateTime NOT NULL.

On my local machine, everything works fine with these changes, I didnt have to do anything else. But using the actual production site on srvr2005 I get the SqlDatetime overflow error.

Any ideas?

A: 

date in SQL Server 2008 has a range of 1/1/0001 to 12/31/9999. datetime is 1/1/1753 to 12/31/9999. Are you doing something pre-American Revolution?

Also, smalldatetime is 1/1/1900 to 6/6/2079. You may have a date that falls out of this range that could be a problem.

Eric
A: 

Depends on what the value of the DateTime is. Are you generating any dates before 1753 or greater than 9999-12-31 ?

devstuff
+1  A: 

Figured it out. I was right, it was something dumb on my part. Sorry to waste your time, I have a habbit of figuring things out as soon as a ask someone

jdc0589
Care to elaborate? "Figured it out" doesn't help posterity :)
Eric