mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX Fixed error when connecting to the database
This commit is contained in:
parent
6f42abda19
commit
27975ad20f
@ -23,7 +23,7 @@ class MSSQLAzureDatabase extends MSSQLDatabase {
|
||||
protected $fullTextEnabled = false;
|
||||
|
||||
public function __construct($parameters) {
|
||||
$this->dbConn = $this->connectDatabase($parameters);
|
||||
$this->connectDatabase($parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ class MSSQLAzureDatabase extends MSSQLDatabase {
|
||||
* @return resource SQL Azure database connection link
|
||||
*/
|
||||
protected function connectDatabase($parameters) {
|
||||
$conn = sqlsrv_connect($parameters['server'], array(
|
||||
$this->dbConn = sqlsrv_connect($parameters['server'], array(
|
||||
'Database' => $parameters['database'],
|
||||
'UID' => $parameters['username'],
|
||||
'PWD' => $parameters['password'],
|
||||
@ -47,8 +47,6 @@ class MSSQLAzureDatabase extends MSSQLDatabase {
|
||||
|
||||
$this->query('SET QUOTED_IDENTIFIER ON');
|
||||
$this->query('SET TEXTSIZE 2147483647');
|
||||
|
||||
return $conn;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user