Skip to content

Commit 161fbb5

Browse files
committed
Fixes MSSQL connection string on empty DB
1 parent a7ea337 commit 161fbb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mssql/Open-IcingaMSSQLConnection.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function Open-IcingaMSSQLConnection()
6868
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection;
6969
$SqlConnection.ConnectionString = "Server=$Address,$Port;";
7070

71-
if ($null -ne $SqlDatabase) {
71+
if ([string]::IsNullOrEmpty($SqlDatabase) -eq $FALSE) {
7272
$SqlConnection.ConnectionString += "Database=$SqlDatabase;";
7373
}
7474

0 commit comments

Comments
 (0)