When updating a list of objects in my database, I am getting a SqlDateTime overflow exception on the same object(s) every time I try to call SaveChanges. Whats strange is that if I start from a blank database, those same records are added initially without issue. It is whenever I try to update them later on that I am getting these errors.
The stack trace is as follows:
Telerik.OpenAccess.Exceptions.DataStoreException: Update failed: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00AM and 12/31/9999 11:59:59 PM. at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate(Nullable`1 commandTimeout) at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeUpdate(Nullable`1 commandTimeout) at OpenAccessRuntime.Relational.RelationalStorageManager.generateUpdates(OIDoid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, Boolean haveNewObjects, CharBuf s, BatchControlInfo batchControl, Boolean previousInserts)Row: GenericOID@1ebe2d8e RTVirtualMachine ID=79UPDATE [VirtualMachines] SET [BootFree] = ?, [BootTotal] = ?, [DataFree] = ?, [DataTotal] = ?, [HostName] = ?, [IsActive] = ?, [Memory] = ?, [OsVersion] = ?, [ProcessorTimeStamp] = ?, [ProcessorUsagePct] = ?, [UserCount] = ?, [VCpuCount] =?, [VmName] = ? WHERE [ID] = ? AND [BootFree] = ? AND [BootTotal] = ? AND [DataFree] = ? AND [DataTotal] = ? AND [HostName] = ? AND [IsActive] = ? AND [Memory]= ? AND [OsVersion] = ? AND [ProcessorTimeStamp] = ? AND [ProcessorUsagePct] = ? AND [UserCount] = ? AND [VCpuCount] = ? AND [VmName] = ?Params: [@p0=0 @p1=0 @p2=0 @p3=0 @p4="RT-VM-Host7" @p5=1 @p6=11999 @p7=2008 @p8=0001-01-01T00:00:00.0000000 @p9=0 @p10=24 @p11=5 @p12="TSERVER3" @p13=79 @p14=0@p15=0 @p16=0 @p17=0 @p18="RT-VM-Host7" @p19=1 @p20=11999.0000000000 @p21=2008 @p22=2015-12-01T12:58:35.5300000 @p23=0 @p24=25 @p25=5 @p26="TSERVER3"] System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.Usually when I got an exception, the parameters in the stack trace would look normal, showing @p1, @p2, etc etc but for this particular case they are all showing as question marks in the stack trace and I am not sure why or if it has anything to do with the error I am getting here.
The parameter in question is @p22, which as you can see is a DateTime that is well within the limits of the SqlDateTime, unless I am reading that wrong.
What else could cause this?