public PreparedStatement getStatement(String query) {
		PreparedStatement statement = null;
		try {
			if(getConnection().isClosed() || (getConnection() == null)) {
				connect();
			}
			statement = getConnection().prepareStatement(query);
			return statement;
		} catch(Exception e) {
			e.printStackTrace();
			try {
				connect();
			} catch (Exception e1) {
				e1.printStackTrace();
			}
			return null;
		}
	}