예제 #1
0
 /**
  * @param Account $account
  * @return MsSqlStorage
  */
 function MsSqlStorage(&$account, $settings = null)
 {
     DbStorage::DbStorage($account, $settings);
     $this->_escapeType = QUOTE_DOUBLE;
     $this->_commandCreator = new MsSqlCommandCreator($settings);
     if ($this->_settings->UseCustomConnectionString || $this->_settings->UseDsn) {
         require_once WM_ROOTPATH . 'db/class_dbodbc.php';
         if ($this->_settings->UseCustomConnectionString) {
             $this->_dbConnection = new DbOdbc($this->_settings->DbCustomConnectionString, $this->_settings->DbType, $this->_settings->DbLogin, $this->_settings->DbPassword);
         } else {
             $this->_dbConnection = new DbOdbc('DSN=' . $this->_settings->DbDsn . ';', $this->_settings->DbType, $this->_settings->DbLogin, $this->_settings->DbPassword);
         }
     } else {
         require_once WM_ROOTPATH . 'db/class_dbmssql.php';
         $this->_dbConnection = new DbMsSql($this->_settings->DbHost, $this->_settings->DbLogin, $this->_settings->DbPassword, $this->_settings->DbName);
     }
 }
예제 #2
0
 /**
  * @param Account $account
  * @return MsSqlStorage
  */
 function MsSqlStorage(&$account)
 {
     DbStorage::DbStorage($account);
     $this->_escapeType = QUOTE_DOUBLE;
     $this->_commandCreator =& new MsSqlCommandCreator();
     if ($this->_settings->UseCustomConnectionString) {
         require_once WM_ROOTPATH . 'db/class_dbodbc.php';
         $this->_dbConnection =& new DbOdbc($this->_settings->DbCustomConnectionString, DB_MSSQLSERVER);
     } else {
         require_once WM_ROOTPATH . 'db/class_dbmssql.php';
         $this->_dbConnection =& new DbMsSql($this->_settings->DbHost, $this->_settings->DbLogin, $this->_settings->DbPassword, $this->_settings->DbName);
     }
 }