diff --git a/lib/db.php b/lib/db.php
index b9505b88d8274769ec5d58d008a6d50a7d83e142..1e5d12649df0be92dedd794e5408cb7fade84b33 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -87,6 +87,7 @@ class OC_DB {
 							'driver' => 'pdo_sqlite',
 					);
 					$connectionParams['adapter'] = '\OC\DB\AdapterSqlite';
+					$connectionParams['wrapperClass'] = 'OC\DB\Connection';
 					break;
 				case 'mysql':
 					$connectionParams = array(
@@ -99,6 +100,7 @@ class OC_DB {
 							'driver' => 'pdo_mysql',
 					);
 					$connectionParams['adapter'] = '\OC\DB\Adapter';
+					$connectionParams['wrapperClass'] = 'OC\DB\Connection';
 					break;
 				case 'pgsql':
 					$connectionParams = array(
@@ -110,6 +112,7 @@ class OC_DB {
 							'driver' => 'pdo_pgsql',
 					);
 					$connectionParams['adapter'] = '\OC\DB\AdapterPgSql';
+					$connectionParams['wrapperClass'] = 'OC\DB\Connection';
 					break;
 				case 'oci':
 					$connectionParams = array(
@@ -124,6 +127,7 @@ class OC_DB {
 						$connectionParams['port'] = $port;
 					}
 					$connectionParams['adapter'] = '\OC\DB\AdapterOCI8';
+					$connectionParams['wrapperClass'] = 'OC\DB\OracleConnection';
 					$eventManager->addEventSubscriber(new \Doctrine\DBAL\Event\Listeners\OracleSessionInit);
 					break;
 				case 'mssql':
@@ -137,11 +141,11 @@ class OC_DB {
 							'driver' => 'pdo_sqlsrv',
 					);
 					$connectionParams['adapter'] = '\OC\DB\AdapterSQLSrv';
+					$connectionParams['wrapperClass'] = 'OC\DB\Connection';
 					break;
 				default:
 					return false;
 			}
-			$connectionParams['wrapperClass'] = 'OC\DB\Connection';
 			$connectionParams['tablePrefix'] = OC_Config::getValue('dbtableprefix', 'oc_' );
 			try {
 				self::$connection = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config, $eventManager);
diff --git a/lib/db/oracleconnection.php b/lib/db/oracleconnection.php
new file mode 100644
index 0000000000000000000000000000000000000000..3da3d91dbfaf023784ddc7ae505804ee5ce3e533
--- /dev/null
+++ b/lib/db/oracleconnection.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\DB;
+
+class OracleConnection extends Connection {
+	/**
+	 * Quote the keys of the array
+	 */
+	private function quoteKeys(array $data) {
+		$return = array();
+		foreach($data as $key => $value) {
+			$return[$this->quoteIdentifier($key)] = $value;
+		}
+		return $return;
+	}
+
+	/*
+	 * (inherit docs)
+	 */
+	public function insert($tableName, array $data, array $types = array()) {
+		$tableName = $this->quoteIdentifier($tableName);
+		$data = $this->quoteKeys($data);
+		return parent::insert($tableName, $data, $types);
+	}
+
+	/*
+	 * (inherit docs)
+	 */
+	public function update($tableName, array $data, array $identifier, array $types = array()) {
+		$tableName = $this->quoteIdentifier($tableName);
+		$data = $this->quoteKeys($data);
+		$identifier = $this->quoteKeys($identifier);
+		return parent::update($tableName, $data, $identifier, $types);
+	}
+
+	/*
+	 * (inherit docs)
+	 */
+	public function delete($tableName, array $identifier) {
+		$tableName = $this->quoteIdentifier($tableName);
+		$identifier = $this->quoteKeys($identifier);
+		return parent::delete($tableName, $identifier);
+	}
+}