_fetch_object(), custom_result_object() to utilize PHP's native capability to directly return custom class results
diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php
index 62996aa..aeede3f 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.php
@@ -26,7 +26,7 @@
  */
 
 /**
- * MS SQL Result Class
+ * MSSQL Result Class
  *
  * This class extends the parent result class: CI_DB_result
  *
@@ -161,11 +161,25 @@
 	 *
 	 * Returns the result set as an object
 	 *
+	 * @param	string
 	 * @return	object
 	 */
-	protected function _fetch_object()
+	protected function _fetch_object($class_name = 'stdClass')
 	{
-		return mssql_fetch_object($this->result_id);
+		$row = @mssql_fetch_object($this->result_id);
+
+		if ($class_name === 'stdClass' OR ! $row)
+		{
+			return $row;
+		}
+
+		$class_name = new $class_name();
+		foreach ($row as $key => $value)
+		{
+			$class_name->$key = $value;
+		}
+
+		return $class_name;
 	}
 
 }