Exemplo n.º 1
0
 private void FillCombo2() {
   try {
     String sql = "SELECT * FROM FLIGHTS";
     db.setPst(db.getCon().prepareStatement(sql));
     db.setRs(db.getPst().executeQuery());
     while (db.getRs().next()) {
       String code = db.getRs().getString("CODE");
       flight.addItem(code);
     }
   } catch (SQLException ex) {
     Logger.getLogger(AddFlight.class.getName()).log(Level.SEVERE, null, ex);
   }
 }
Exemplo n.º 2
0
 private void FillCombo() {
   try {
     String sql = "SELECT * FROM AIRLINES";
     db.setPst(db.getCon().prepareStatement(sql));
     db.setRs(db.getPst().executeQuery());
     while (db.getRs().next()) {
       String name = db.getRs().getString("NAME");
       air.addItem(name);
     }
   } catch (SQLException ex) {
     Logger.getLogger(AddFlight.class.getName()).log(Level.SEVERE, null, ex);
   }
 }