Example #1
0
 public static ResultSet SelectData() {
   ResultSet rs = null;
   try {
     Connection con = ConnectionProvider.getcon();
     Statement stmt = con.createStatement();
     rs = stmt.executeQuery("select * from feedback");
   } catch (Exception e) {
   }
   return rs;
 }
Example #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;
 }
Example #3
0
 public static ResultSet getSelect() {
   ResultSet rs = null;
   try {
     Connection con = ConnectionProvider.getcon();
     Statement stmt = con.createStatement();
     rs =
         stmt.executeQuery(
             "select appointdate,appointtime,appointid from appoint where appointid in (select max(appointid) from appoint)");
   } catch (Exception e) {
   }
   return rs;
 }
Example #4
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);
   }
 }
Example #5
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);
    }
  }