示例#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);
    }
  }
示例#2
0
 public static ResultSet getSelect1(bookprop p) {
   ResultSet rs = null;
   try {
     Connection con = ConnectionProvider.getcon();
     Statement stmt = con.createStatement();
     rs = stmt.executeQuery("select * from appoint where did='" + p.getabc() + "'");
   } catch (Exception e) {
   }
   return rs;
 }