Problem with mssql.vbs when first provider does not work


we had reports that the mssql.vbs-AgentPlugin sometimes didn’t work, but editing
the source to change the order in which the connection-providers are tried would resolve the problem.

There is a loop which tries the different connection providers. If the first one fails,
the others also fail when using SSPI, because in the first iteration of the loop
a dictionary seem get to modified, so that an if-clause fails on the following iterations

AUTH.Exists(“type”) is “TRUE” on the first iteration, but AUTH(“type”) = “system” seems
to create a key with an empty value, there for the if-clause is always false in following iterations

I attached a fixed version (base on 2.2.0i and also a patch)

Best regards

mssql_fixed.vbs (42.7 KB)
mssql.vbs.patch.txt (831 Bytes)