예제 #1
0
 public static void InsertData(feedbackprop p) {
   try {
     Connection con = ConnectionProvider.getcon();
     PreparedStatement stmt = con.prepareStatement("insert into feedback values(?,?,?,?,?)");
     stmt.setString(1, p.getFname());
     stmt.setString(2, p.getLname());
     stmt.setString(3, p.getEmail());
     stmt.setString(4, p.getMob());
     stmt.setString(5, p.getEnq());
     stmt.executeUpdate();
   } catch (Exception e) {
     System.out.println("" + e);
   }
 }
예제 #2
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);
    }
  }