Skip to content

Commit 98f3789

Browse files
authored
Merge pull request #144 from alexmo16/master
support database names containing special characters
2 parents 03c91a6 + 3b913a3 commit 98f3789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Respawn/SqlServerDbAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ private static async Task<byte> GetCompatibilityLevel(DbConnection connection)
330330
command.CommandText = $@"
331331
SELECT compatibility_level
332332
FROM sys.databases
333-
WHERE name = '{connection.Database}';";
333+
WHERE name = N'{connection.Database}';";
334334

335335
var result = await command.ExecuteScalarAsync().ConfigureAwait(false);
336336
return result != null ? Convert.ToByte(result) : (byte)0;

0 commit comments

Comments
 (0)