This question is locked. New answers and comments are not allowed.
Hi,
I have a notnull DateTime column named InsertedDate and its Default Value is GETDATE() for getting server time for inserting new values automatically. At Code behind I do not assign this column.
In model scheme explorer I select "backend calculated". But gives error when inserting to db.
Is there any way to succeed this.
Insert of '2127628280-' failed: Telerik.OpenAccess.RT.sql.SQLException: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)
INSERT INTO [UserPasswordHistory] ([InsertedBy], [InsertedDate], [OldPassword], [UserId]) VALUES (?, ?, ?, ?)
select scope_identity()
(set event logging to all to see parameter values) Telerik.OpenAccess.RT.sql.SQLException: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)
I have a notnull DateTime column named InsertedDate and its Default Value is GETDATE() for getting server time for inserting new values automatically. At Code behind I do not assign this column.
In model scheme explorer I select "backend calculated". But gives error when inserting to db.
Is there any way to succeed this.
Insert of '2127628280-' failed: Telerik.OpenAccess.RT.sql.SQLException: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)
INSERT INTO [UserPasswordHistory] ([InsertedBy], [InsertedDate], [OldPassword], [UserId]) VALUES (?, ?, ?, ?)
select scope_identity()
(set event logging to all to see parameter values) Telerik.OpenAccess.RT.sql.SQLException: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)