This is a very basic question. I am just trying to understand how SQLite database works. So, here's what I do: In the code section below which is taken from notepad tutorial 3rd exercise, I change KEY_TITLE to KEY_NAME and all place I find title to name. And the application crashes. Why does this happen?
public static final String KEY_TITLE = "title";
//change to: public static final String KEY_NAME = "name";
public static final String KEY_BODY = "body";
public static final String KEY_ROWID = "_id";
private static final String TAG = "NotesDbAdapter";
private DatabaseHelper mDbHelper;
private SQLiteDatabase mDb;
/**
* Database creation sql statement
*/
private static final String DATABASE_CREATE =
"create table notes (_id integer primary key autoincrement, "
+ "title text not null, body text not null);";
/*change to: private static final String DATABASE_CREATE = "create table notes (_id integer primary key autoincrement, " + "name text not null, body text not null);"; */