diff --git a/library/think/db/driver/Sqlsrv.php b/library/think/db/driver/Sqlsrv.php index 44710268..6a554771 100644 --- a/library/think/db/driver/Sqlsrv.php +++ b/library/think/db/driver/Sqlsrv.php @@ -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']; }