private MessungInfo lookupMessung(int station_id, Date date) throws SQLException
	{
		try
		{
			MessungInfo messung = new MessungInfo();
			ResultSet setMinDate = connection.query(
				"select *" +
				"from dbsp_wettermessung\n" +
				"where station_id = " + station_id + "\n" +
				"order by datum ASC\n" +
				"limit 1\n" +
				";",
				false
			);
			if( !setMinDate.next())
			{
				return null;
			}
			ResultSet setMaxDate = connection.query(
				"select *" +
				"from dbsp_wettermessung\n" +
				"where station_id = " + station_id + "\n" +
				"order by datum DESC\n" +
				"limit 1\n" +
				";",
				false
			);
			setMaxDate.next();
			PreparedStatement stmt = connection.prepareStmt(
				"select *" +
				"from dbsp_wettermessung\n" +
				"where station_id = " + station_id + "\n" +
				"and datum = ?\n" +
				"order by datum ASC\n" +
				"limit 1\n" +
				";"
			);
			java.sql.Date sQLDate = new java.sql.Date(date.getTime());
			//System.out.println("sqlDatum: " + sQLDate.toString());
			stmt.setDate(1, sQLDate);
			ResultSet set = stmt.executeQuery();
			/*ResultSet set = connection.query(
				"select *" +
				"from dbsp_wettermessung\n" +
				"where station_id = " + station_id + "\n" +
				"and datum >= " + date.toString() + "\n" +
				"order by datum ASC\n" +
				"limit 10\n" +
				";",
				false
			);*/
			if( !set.next())
			{
				System.out.println("no entries found! the date must be between " +
						setMinDate.getDate("datum") + " and " + 
						setMaxDate.getDate("datum")
					);
				return null;
			}
			
			messung.station_id = set.getInt("station_id");
			messung.datum = set.getDate("datum");
			messung.qualitaet = set.getInt("qualitaet");
			messung.min_5cm = set.getDouble("min_5cm");
			messung.min_2m = set.getDouble("min_2m");
			messung.mittel_2m = set.getDouble("mittel_2m");
			messung.max_2m = set.getDouble("max_2m");
			messung.relative_feuchte = set.getDouble("relative_feuchte");
			messung.mittel_windstaerke = set.getDouble("mittel_windstaerke");
			messung.max_windgeschwindigkeit = set.getDouble("max_windgeschwindigkeit");
			messung.sonnenscheindauer = set.getDouble("sonnenscheindauer");
			messung.mittel_bedeckungsgrad = set.getDouble("mittel_bedeckungsgrad");
			messung.niederschlagshoehe = set.getDouble("niederschlagshoehe");
			messung.mittel_luftdruck = set.getDouble("mittel_luftdruck");
			return messung;
		}
		catch(SQLException e)
		{
			throw e;
		}
	}