Browse Source

Optimization error message

pull/19/head
sunkaixuan 2 years ago
parent
commit
cf524fd2d9
  1. 9
      Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlFastBuilder.cs

9
Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlFastBuilder.cs

@ -58,7 +58,14 @@ namespace SqlSugar
} }
catch (MySqlException ex) catch (MySqlException ex)
{ {
throw ex; if (ex.Message == "The used command is not allowed with this MySQL version")
{
Check.ExceptionEasy("connection string add : AllowLoadLocalInfile=true", "BulkCopy MySql连接字符串需要添加 AllowLoadLocalInfile=true; 添加后如果还不行Mysql数据库执行一下 SET GLOBAL local_infile=1 ");
}
else
{
throw ex;
}
} }
finally finally
{ {

Loading…
Cancel
Save