Added DSN string support
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index a674c39..c9aaa6e 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -62,6 +62,12 @@
 		parent::__construct($params);
 
 		$this->_random_keyword = ' RND('.time().')'; // database specific random keyword
+
+		// Legacy support for DSN in the hostname field
+		if ($this->dsn == '')
+		{
+			$this->dsn = $this->hostname;
+		}
 	}
 
 	/**
@@ -71,7 +77,7 @@
 	 */
 	public function db_connect()
 	{
-		return @odbc_connect($this->hostname, $this->username, $this->password);
+		return @odbc_connect($this->dsn, $this->username, $this->password);
 	}
 
 	// --------------------------------------------------------------------
@@ -83,7 +89,7 @@
 	 */
 	public function db_pconnect()
 	{
-		return @odbc_pconnect($this->hostname, $this->username, $this->password);
+		return @odbc_pconnect($this->dsn, $this->username, $this->password);
 	}
 
 	// --------------------------------------------------------------------