public ResultSet retry(String query) {
		// boolean passed = false;
		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")) {
				this.writeError("Please close your previous ResultSet to run the query: \n" + query, false);
				// passed = false;
			} else {
				this.writeError("Error in SQL query: " + ex.getMessage(), false);
			}
		}
		// }

		return null;
	}