From 7151e80ea8653638b4729a6a6271f792aabdfe03 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jun 2012 00:47:41 +0300 Subject: Add pdo_dblib subdriver --- .../drivers/pdo/subdrivers/pdo_sqlsrv_driver.php | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php') diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php index 20837ee1f..f7e242016 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php @@ -64,6 +64,41 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver { empty($this->port) OR $this->dsn .= ','.$this->port; empty($this->database) OR $this->dsn .= ';Database='.$this->database; + + // Some custom options + + if (isset($this->QuotedId)) + { + $this->dsn .= ';QuotedId='.$this->QuotedId; + $this->_quoted_identifier = (bool) $this->QuotedId; + } + + if (isset($this->ConnectionPooling)) + { + $this->dsn .= ';ConnectionPooling='.$this->ConnectionPooling; + } + + if (isset($this->Encrypt)) + { + $this->dsn .= ';Encrypt='.$this->Encrypt; + } + + if (isset($this->TraceOn)) + { + $this->dsn .= ';TraceOn='.$this->TraceOn; + } + + if (isset($this->TrustServerCertificate)) + { + $this->dsn .= ';TrustServerCertificate='.$this->TrustServerCertificate; + } + + empty($this->APP) OR $this->dsn .= ';APP='.$this->APP; + empty($this->Failover_Partner) OR $this->dsn .= ';Failover_Partner='.$this->Failover_Partner; + empty($this->LoginTimeout) OR $this->dsn .= ';LoginTimeout='.$this->LoginTimeout; + empty($this->MultipleActiveResultSets) OR $this->dsn .= ';MultipleActiveResultSets='.$this->MultipleActiveResultSets; + empty($this->TraceFile) OR $this->dsn .= ';TraceFile='.$this->TraceFile; + empty($this->WSID) OR $this->dsn .= ';WSID='.$this->WSID; } elseif (preg_match('/QuotedId=(0|1)/', $this->dsn, $match)) { -- cgit v1.2.3-24-g4f1b