public ResultSet retryResult(String query) {
		boolean passed = false;
		Connection connection = open();
		Statement statement = null;
		ResultSet result = null;
		
		while (!passed) {
			try {
				statement = connection.createStatement();
				result = statement.executeQuery(query);
				passed = true;
				return result;
			} catch (SQLException ex) {
				if (ex.getMessage().toLowerCase().contains("locking") || ex.getMessage().toLowerCase().contains("locked")) {
					passed = false;
				} else {
					this.writeError("Error at SQL Query: " + ex.getMessage(), false);
				}
			}
		}
		
		return null;
	}