MySql Db.Fastest.BulkCop " bug

This commit is contained in:
sunkaixuna
2022-01-14 16:08:49 +08:00
parent cc09cc8411
commit 505a0d421b
2 changed files with 62 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@@ -164,7 +164,7 @@ namespace SqlSugar
{ {
colum = table.Columns[i]; colum = table.Columns[i];
if (i != 0) sb.Append(","); if (i != 0) sb.Append(",");
if (colum.DataType == typeof(string) &&( row[colum].ToString().Contains(",") || row[colum].ToString().Contains("\r"))) if (colum.DataType == typeof(string) &&( row[colum].ToString().Contains(",") || row[colum].ToString().Contains("\r")||row[colum].ToString().Contains("\"")))
{ {
sb.Append("\"" + row[colum].ToString().Replace("\"", "\"\"") + "\""); sb.Append("\"" + row[colum].ToString().Replace("\"", "\"\"") + "\"");
} }