}\r
}\r
\r
+ //******* INSERT, UPDATE, DELETE *******************//\r
+ /**\r
+ * Executes an insert, update or delete statement.\r
+ * Returns the number of rows changed or -1 if updatedStatement was 0 or and error occurred. \r
+ * Does not change the Sources query-string!!\r
+ * @return Resultset for the query.\r
+ */\r
+ public int update (String updateStatement){\r
+ int result;\r
+ try {\r
+ this.getConnection(); //establish connection\r
+ if (updateStatement == null){\r
+ return -1;\r
+ }\r
+ mStmt = mConn.createStatement();\r
+ result = mStmt.executeUpdate(updateStatement);\r
+ return result;\r
+ }catch(SQLException e){\r
+ logger.error("Problems when creating Resultset for query \n " + updateStatement + " \n" + "Exception: " + e);\r
+ return -1;\r
+ }\r
+ }\r
+\r
\r
/** \r
* Returns the Resultset for Sources query. \r