summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php41
1 files changed, 15 insertions, 26 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
index 048759fef..fbd279681 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
@@ -334,31 +334,20 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver {
return ($this->db_debug) ? $this->display_error('db_unsupported_feature') : FALSE;
}
+ // --------------------------------------------------------------------
+
/**
- * Database version number
- * Fix by Andrei Rosseti <andrei@facedigital.com.br>
- * @return string
- */
- public function version()
- {
- if (isset($this->data_cache['version']))
- {
- return $this->data_cache['version'];
- }
-
- try
- {
- $productversion = $this->conn_id->query("SELECT
- CAST(
- SERVERPROPERTY('productversion')
- AS VARCHAR
- )")->fetchColumn(0);
-
- return $this->data_cache['version'] = $productversion;
- }
- catch (PDOException $e)
- {
- return parent::version();
- }
- }
+ * Database version number
+ *
+ * @return string
+ */
+ public function version()
+ {
+ if (isset($this->data_cache['version']))
+ {
+ return $this->data_cache['version'];
+ }
+
+ return $this->data_cache['version'] = $this->conn_id->query("SELECT SERVERPROPERTY('ProductVersion') AS ver")->fetchColumn(0);
+ }
}