API support dblib (#5996)

This commit is contained in:
Damian Mooyman 2016-09-16 11:39:29 +12:00 committed by Sam Minnée
parent f25b88b146
commit b87c668bf4

View File

@ -123,6 +123,12 @@ class PDOConnector extends DBConnector {
$server .= ",{$parameters['port']}";
}
$dsn[] = "Server=$server";
} elseif ($parameters['driver'] === 'dblib') {
$server = $parameters['server'];
if (!empty($parameters['port'])) {
$server .= ":{$parameters['port']}";
}
$dsn[] = "host={$server}";
} else {
if (!empty($parameters['server'])) {
// Use Server instead of host for sqlsrv