So... This is my code:
public static final String DATABASE_NAME = "MY_DATABASE";
public static final String DATABASE_TABLE = "MY_TABLE";
public static final int DATABASE_VERSION = 1;
public static final String KEY_CONTENT = "Content";
public static final String KEY_ID = "_id";
private static final String SCRIPT_CREATE_DATABASE = "create table "
+ DATABASE_TABLE + " (" + KEY_ID
+ " integer primary key, " + KEY_CONTENT
+ " text not null);";
private SQLiteHelper sqLiteHelper;
private SQLiteDatabase sqLiteDatabase;
private Context context;
public SQLiteAdapter(Context c) { context = c; }
public int delete() {
return sqLiteDatabase.delete(DATABASE_TABLE, KEY_ID , null);
}
There is no mistake message in log. Only break when I run it in my phone. I've used a lot of solutions. It does not want to work((( Could anybody tell, how to delete the last element in my table?