修正sqlsrv驱动

This commit is contained in:
thinkphp
2016-02-16 21:33:47 +08:00
parent 78cd92bfeb
commit 9869f5b94e

View File

@@ -36,7 +36,7 @@ class Sqlsrv extends Driver
*/
protected function parseDsn($config)
{
$dsn = 'sqlsrv:dbname=' . $config['database'] . ';Server=' . $config['hostname'];
$dsn = 'sqlsrv:Database=' . $config['database'] . ';Server=' . $config['hostname'];
if (!empty($config['hostport'])) {
$dsn .= ',' . $config['hostport'];
}