--- android/TrainInfoService/src/dk/thoerup/traininfoservice/db/StationDAO.java 2012/02/24 13:45:51 1691 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/db/StationDAO.java 2012/02/24 14:26:53 1692 @@ -344,6 +344,23 @@ return station; } + public boolean hasDisabledStation(final String name) throws SQLException { + String SQL = "Select count(*) as antal from trainstations where name = '" + name + "' and enabled=false " ; + + Connection conn = DBConnection.getConnection(); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery( SQL ); + + rs.next(); + + int antal = rs.getInt(1); + + rs.close(); + stmt.close(); + conn.close(); + + return (antal > 0); + } @Deprecated