check if table exists before dropping

live-activity-data
cpfeiffer 2015-07-11 21:16:07 +02:00
parent a6e26e5ddc
commit be45f7fe0c
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ public class DBHelper {
}
public static void dropTable(String tableName, SQLiteDatabase db) {
db.delete(tableName, null, null);
String statement = "DROP TABLE IF EXISTS '" + tableName + "'";
db.execSQL(statement);
}
/**