/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Database.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Database.java

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

revision 2202 by torben, Thu Sep 11 08:14:40 2014 UTC revision 2203 by torben, Thu Sep 11 14:46:59 2014 UTC
# Line 94  public class Database { Line 94  public class Database {
94    
95          public List<Integer> hentPostnumre() throws SQLException {          public List<Integer> hentPostnumre() throws SQLException {
96                  ArrayList<Integer> list = new ArrayList<Integer>();                  ArrayList<Integer> list = new ArrayList<Integer>();
97                    
98                    Constants consts = Constants.getInstance();
99    
100    
101                  String sql = "SELECT postnr " +                  String sql = "SELECT postnr " +
102                                           "FROM fulddaekning.adressetabel " +                                           "FROM fulddaekning.adressetabel " +
103                                           "WHERE distributor = ? and rute is not null " +                                           //"WHERE distributor = ? and rute is not null " +
104                                             "WHERE postnr BETWEEN ? AND ? " +
105                                           "GROUP BY postnr " +                                           "GROUP BY postnr " +
106                                           "ORDER by postnr";                                           "ORDER by postnr";
107                  PreparedStatement stmt = conn.prepareStatement(sql);                  PreparedStatement stmt = conn.prepareStatement(sql);
108                  stmt.setString(1, Lookup.distributor );                  //stmt.setString(1, Lookup.distributor );
109                    stmt.setInt(1, consts.getMinPostnr());
110                    stmt.setInt(2, consts.getMaxPostnr());
111                  ResultSet res = stmt.executeQuery();                  ResultSet res = stmt.executeQuery();
112    
113                  while (res.next()) {                  while (res.next()) {

Legend:
Removed from v.2202  
changed lines
  Added in v.2203

  ViewVC Help
Powered by ViewVC 1.1.20