here is my code i debug and checked a lot but i did't get why this not working. Please help me some one.
if (msg.equals("succes"))
{
Connection c = null;
Statement stmt = null;
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:C:\\Users\\pk\\Documents\\NetBeansProjects\\HRMS\\employee.sqlite");
c.setAutoCommit(false);
stmt = c.createStatement();
String sql = "DELETE FROM attendance";
stmt.executeUpdate(sql);
stmt.execute(sql);
System.out.println(sql);
JOptionPane.showMessageDialog(null, "data are sent to server and deleted from local sqlite");
rs.close();
stmt.close();
c.close();
}
else
{
JOptionPane.showMessageDialog(null, msg);
}
Aucun commentaire:
Enregistrer un commentaire