Example #1
0
  public static void insertappoint2(bookprop p) {
    try {
      Connection con = ConnectionProvider.getcon();
      PreparedStatement stmt =
          con.prepareStatement(
              "insert into appoint(appointdate,appointtime,did,pid,symptoms) values(?,?,?,?,?)");
      stmt.setString(1, p.getdate1());
      stmt.setString(2, p.gettime1());
      stmt.setInt(3, Integer.parseInt(p.getdid()));
      stmt.setInt(4, Integer.parseInt(p.getpid()));
      stmt.setString(5, p.getSymp());

      stmt.executeUpdate();
    } catch (Exception e) {
      System.out.println("" + e);
    }
  }