/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/db/StationDAO.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/db/StationDAO.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1691 by torben, Sat Jul 9 17:34:55 2011 UTC revision 1692 by torben, Fri Feb 24 14:26:53 2012 UTC
# Line 344  public class StationDAO { Line 344  public class StationDAO {
344                  return station;                  return station;
345          }          }
346                    
347            public boolean hasDisabledStation(final String name) throws SQLException {
348                    String SQL = "Select count(*) as antal from trainstations where name = '" + name + "'  and enabled=false " ;
349    
350                    Connection conn = DBConnection.getConnection();
351                    Statement stmt = conn.createStatement();
352                    ResultSet rs = stmt.executeQuery( SQL );
353                    
354                    rs.next();
355    
356                    int antal = rs.getInt(1);
357                    
358                    rs.close();
359                    stmt.close();
360                    conn.close();
361                    
362                    return (antal > 0);
363            }
364                    
365                    
366          @Deprecated          @Deprecated

Legend:
Removed from v.1691  
changed lines
  Added in v.1692

  ViewVC Help
Powered by ViewVC 1.1.20