SqlServer create database contains ". " error

This commit is contained in:
sunkaixuan 2022-07-06 03:59:57 +08:00
parent 535cbdd816
commit d047a4fe58

View File

@ -476,6 +476,10 @@ namespace SqlSugar
filegrowth = 10mb
); ";
}
if (databaseName.Contains("."))
{
databaseName = $"[{databaseName}]";
}
newDb.Ado.ExecuteCommand(string.Format(sql, databaseName, databaseDirectory));
}
return true;