I am using C# to interface with a SQL database. the database has a DateTime field. When I try to write a DateTime object from C#, I get the following error:
ERROR [22008] [Microsoft][ODBC SQL Server Driver]Datetime field overflow
I found this on the topic:
Is there any manipulation I can do to my DateTime object on the C# side?
EDITS I am trying to add DateTime.MinValue
Sounds like you are just passing in a bad date. For example, DateTime.MinValue is outside the accepted range for SQL Server datetime values by about 1600 years.
By the way, you shouldn't be using ODBC for C# to SQL Server communication. Using System.Data.SqlClient will give you much better performance.