Optimize code

This commit is contained in:
sunkaixuan
2022-12-04 04:13:39 +08:00
parent 4b7e198a3d
commit 5bedce0f5c

View File

@@ -62,9 +62,14 @@ namespace SqlSugar
{
Check.ExceptionEasy("connection string add : AllowLoadLocalInfile=true", "BulkCopy MySql连接字符串需要添加 AllowLoadLocalInfile=true; 添加后如果还不行Mysql数据库执行一下 SET GLOBAL local_infile=1 ");
}
else if (ex.Message == "Loading local data is disabled; this must be enabled on both the client and server sides")
{
this.Context.Ado.ExecuteCommand("SET GLOBAL local_infile=1");
Check.ExceptionEasy(ex.Message, " 检测到你没有开启文件,已自动执行 SET GLOBAL local_infile=1 在试一次");
}
else
{
throw ex;
throw;
}
}
finally