zoukankan      html  css  js  c++  java
  • UpdateException-更新条目时出错分析

    不屁话1张图搞定:

    我是这个错:

    2015-03-27 00:25:00,493 [9] ERROR log - System.Data.Entity.Infrastructure.DbUpdateException: 更新条目时出错。有关详细信息,请参阅内部异常。 ---> System.Data.Entity.Core.UpdateException: 更新条目时出错。有关详细信息,请参阅内部异常。 ---> System.Data.SqlClient.SqlException: 从 datetime2 数据类型到 datetime 数据类型的转换产生一个超出范围的值。
    语句已终止。
    在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
    在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
    在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
    在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    在 System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext`1 c)
    在 System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
    在 System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext)
    在 System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery()
    在 System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues)
    在 System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
    --- 内部异常堆栈跟踪的结尾 ---
    在 System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
    在 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator ut)
    在 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction)
    在 System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update()
    在 System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__d()
    在 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
    在 System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
    在 System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClassb.<SaveChangesInternal>b__8()
    在 System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
    在 System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
    在 System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options)
    在 System.Data.Entity.Internal.InternalContext.SaveChanges()
    --- 内部异常堆栈跟踪的结尾 ---
    在 System.Data.Entity.Internal.InternalContext.SaveChanges()
    在 System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
    在 System.Data.Entity.DbContext.SaveChanges()
    在 LoT.Dal.BaseDal`1.UpdateModel(T model) 位置 c:UsersDNTDesktopLoTCodeLoTBlogLoT.DalBaseDal.cs:行号 78
    在 LoT.Service.BaseService`1.UpdateModel(T model) 位置 c:UsersDNTDesktopLoTCodeLoTBlogLoT.ServiceBaseService.cs:行号 63
    在 LoTBlog.Back.Controllers.ArticleController.Update(Int32 ArticleId, Int32 SeoId, String Title, String Author, String TContent, String TypeIds, String TagIds, Int32 GroupType, Int32 Recommend, Int32 HitCount, Int32 Sort, Int32 Status, String DisplayPic, String SeoKeywords, String Seodescription) 位置 c:UsersDNTDesktopLoTCodeLoTBlogLoTBlog.BackControllersArticleController.cs:行号 237
    在 lambda_method(Closure , ControllerBase , Object[] )
    在 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
    在 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
    在 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeSynchronousActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
    在 System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
    在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
    在 System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult)
    在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
    在 System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvokeAction>b__20()
    在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)

  • 相关阅读:
    【Cocos2d-Js基础教学(3)各种基类的定义和使用】
    【Cocos2d-Js基础教学(2)类的使用和面向对象】
    【Cocos2d-x 3.X 资源及脚本解密】
    Django项目中使用Redis
    Django项目中使用Redis
    Django学习笔记二
    Django初识 学习笔记一
    前端之HTML(一)
    mysql(三) 数据表的基本操作操作
    python 词云小demo
  • 原文地址:https://www.cnblogs.com/dunitian/p/4370533.html
Copyright © 2011-2022 走看看