Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection connection1 = null;
- PreparedStatement ps1 = null;
- ResultSet rs3 = null;
- Connection connection3 = null;
- PreparedStatement ps3 = null;
- ResultSet rs4 = null;
- try {
- Class.forName("com.mysql.jdbc.Driver");
- connection1 = DriverManager.getConnection("jdbc:mysql://localhost:3306/beautysalon?" + "user=root&password=thiva");
- System.out.println("connected");
- ps1 = connection1.prepareStatement("SELECT image FROM colour WHERE Date ='" + tbl_click + "'");
- rs3 = ps1.executeQuery();
- System.out.println("z" + " " + rs3);
- byte b[] = null;
- while (rs3.next()) {
- b = rs3.getBytes(1);
- jLabel18.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(b)));
- }
- try {
- Class.forName("com.mysql.jdbc.Driver");
- connection3 = DriverManager.getConnection("jdbc:mysql://localhost:3306/beautysalon?" + "user=root&password=thiva");
- System.out.println("connected1");
- ps3 = connection3.prepareStatement("SELECT aftimg FROM colour WHERE Date ='" + tbl_click + "'");
- rs4 = ps3.executeQuery();
- System.out.println("y" + " " + rs4);
- byte c[] = null;
- while (rs4.next()) {
- c = rs4.getBytes(1);
- jLabel14.setIcon(new ImageIcon(Toolkit.getDefaultToolkit().createImage(c)));
- }
- } catch (Exception e) {
- }
- } catch (Exception e) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement