I have a method which takes in some parameters, among which there are three DateTime
fields (populated from the Web Form).
The method uses an automatically generated TableAdapter
and DataSet
to add a new record onto a table. After the Table.Add[newRow]
statement, we call the Dataset.Update(Table)
statement to persist the addition onto the database.
While this works as expected for almost all cases, it sometimes gives an error:
System.Data.SqlClient.SqlException (0x80131904): The conversion of a date data type to a datetime data type resulted in an out-of-range value
The statement has been terminated.
.
Does anyone have a clue as to what may be happening?