android - .SQLiteException: near ",": syntax error (code 1): , while compiling: -
what missing? "," seem looking in wrong place. code:
private static final string database_create = "create table if not exists " + sqlite_table + " (" + key_rowid + " integer primary key autoincrement," + key_cursus + "," + key_onderdeel + "," + key_game + "," + key_tijd + "," + key_web + "," + key_check + "," + " unique (" + key_rowid +"));";
and error get:
caused by: android.database.sqlite.sqliteexception: near ",": syntax error (code 1): , while compiling: create table if not exists games_getset (_id integer primary key autoincrement,cursus,onderdeel,game,tijd,web,check, unique (_id));
rename or quote check
column since check
keyword in sql.
for example:
private static final string database_create = "create table if not exists " + sqlite_table + " (" + key_rowid + " integer primary key autoincrement," + key_cursus + "," + key_onderdeel + "," + key_game + "," + key_tijd + "," + key_web + "," + + "`" + key_check + "`," + " unique (" + key_rowid +"));";
Comments
Post a Comment