These code blocks work, but ... If I use these blocks one by one, my application does not delete the database file. ( resultequal to false)
sqlite manages the part:
Class.forName("org.sqlite.JDBC").newInstance();
conn = DriverManager.getConnection("jdbc:sqlite:/"+ myDBpath);
stmt = conn.createStatement();
stmt.close();
removal part:
//remove this file
boolean result = new File(myDBpath).delete();
But if I use only delete code without database operations, it works! What for? How can i avoid this?
source
share