Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Reset_Table1 {
- private Component frame;
- {
- try {
- Connection connection=null;
- dbConnection obj_dbConnection=new dbConnection();
- connection=obj_dbConnection.getConnection();
- ResultSet rs=null;
- String query = "TRUNCATE TABLE device_1";
- connection.createStatement().execute(query);
- System.out.println("device_1 deleted");
- JOptionPane.showMessageDialog(frame,
- "Reseted");
- } catch (SQLException e) {
- JOptionPane.showMessageDialog(frame,
- "Reset failed",
- "Reset failed",
- JOptionPane.ERROR_MESSAGE);
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement