Excel批量上传保存报错
2022-10-25 19:57:49
438次阅读
3个回答

Excel批量上传,上传没问题,保存报错,错误日志如下:

2022-10-25 17:28:10,426 [19] ERROR ES.LibraryV2.Web.Handler.ESCommonModule [(null)] - 未处理异常
MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered attempting to read the resultset. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered attempting to read the resultset. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Expected end of data packet
   在 MySql.Data.MySqlClient.NativeDriver.CheckEOF()
   在 MySql.Data.MySqlClient.NativeDriver.GetColumnsData(MySqlField[] columns)
   在 MySql.Data.MySqlClient.Driver.GetColumns(Int32 count)
   在 MySql.Data.MySqlClient.ResultSet.LoadColumns(Int32 numCols)
   在 MySql.Data.MySqlClient.ResultSet..ctor(Driver d, Int32 statementId, Int32 numCols)
   在 MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)
   在 MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   在 MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   在 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   在 MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   在 MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   在 ES.LibraryV2.Database.DataAccess.ESDbQuery.b()
   在 ES.LibraryV2.Database.DataOperator.ESDictionaryDataModel.a(String A_0, String A_1, IDictionary A_2, ICollection`1 A_3, ICollection`1 A_4, ESDataBackupMode A_5, ESDataBackupContext A_6)
   在 ES.LibraryV2.Database.DataOperator.ESDataOperator.Update(String tableName, IDictionary data, ICollection`1 keyFields, ICollection`1 updateFields, ESDataBackupMode backupMode, ESDataBackupContext backupContext)
   在 ES.UIV2.WebControl.ExcelImport.Worker.ESExcelImportUploadWorker.DoTmpDataImport()
   在 ES.UIV2.WebControl.ExcelImport.Action.ESExcelImportAction.Process(ESEngineContext engineContext, ESActionContext actionContext)
   在 ES.LibraryV2.Web.Handler.ESBaseHttpHandler.ProcessRequest(HttpContext context)
   在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2022-10-25 17:28:10,427 [19] ERROR h [(null)] - ESSessionHolder:RollbackTrans
System.InvalidOperationException: Connection must be valid and open to rollback transaction
   在 MySql.Data.MySqlClient.MySqlTransaction.Rollback()
   在 ES.LibraryV2.Database.DataAccess.ESTransaction.Rollback()
   在 h.d()
2022-10-25 17:28:10,428 [19] ERROR h [(null)] - ESSessionHolder:CommitTrans
System.InvalidOperationException: Connection must be valid and open to commit transaction
   在 MySql.Data.MySqlClient.MySqlTransaction.Commit()
   在 ES.LibraryV2.Database.DataAccess.ESTransaction.Commit()
   在 h.c()

收藏 0

登录 后回答问题。没有帐号? 注册 一个。

    2022-10-25 20:00:25
    最佳答案

    根据日志看看mysql的dll是否有问题。

    另外确认一下mysql的版本

    再就是字段有没有用到utf8mb4,版本低的mysql对utf8mb4支持不好,会报错。

    2022-10-25 20:05:03
    最佳答案

    MySQL版本5.7.10,确实有个字段没注意用了utf8mb4

    2022-10-25 20:05:58
    最佳答案
    速e是支持utf8mb4的,只是MySQL版本过低了,MySQL不支持utf8mb4,导致系统报错。
共3条 1

欣欣

  • 0 回答
  • 0 粉丝
  • 0 关注