Browse Source

MySql bluk copy linux bug

pull/1/MERGE
sunkaixuna 4 years ago
parent
commit
19d74f7ba7
  1. 4
      Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs

4
Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBlueCopy.cs

@ -66,13 +66,13 @@ namespace SqlSugar
}); });
dt.Rows.Add(row); dt.Rows.Add(row);
} }
var dllPath = AppDomain.CurrentDomain.BaseDirectory + "failFiles"; var dllPath =Path.Combine(AppDomain.CurrentDomain.BaseDirectory , "failFiles");
DirectoryInfo dir = new DirectoryInfo(dllPath); DirectoryInfo dir = new DirectoryInfo(dllPath);
if (!dir.Exists) if (!dir.Exists)
{ {
dir.Create(); dir.Create();
} }
var fileName = dllPath + "\\" + Guid.NewGuid().ToString() + ".csv"; var fileName =Path.Combine( dllPath , Guid.NewGuid().ToString() + ".csv");
var dataTableToCsv = DataTableToCsvString(dt); var dataTableToCsv = DataTableToCsvString(dt);
File.WriteAllText(fileName, dataTableToCsv, new UTF8Encoding(false)); File.WriteAllText(fileName, dataTableToCsv, new UTF8Encoding(false));
MySqlConnection conn = this.Context.Ado.Connection as MySqlConnection; MySqlConnection conn = this.Context.Ado.Connection as MySqlConnection;

Loading…
Cancel
Save