android.database.sqlite.SQLiteException

near "index": syntax error (code 1): , while compiling: CREATE TABLE users(index INTEGER PRIMARY KEY,user TEXT ,password TEXT)


Solutions on the web1804

Solution icon of stackoverflow
via Stack Overflow by Wojciech Liszka
, 6 months ago
near "index": syntax error (code 1): , while compiling: CREATE TABLE users(index INTEGER PRIMARY KEY,user TEXT ,password TEXT)

Solution icon of stackoverflow
near "AUTOINCREMENT": syntax error (code 1): , while compiling: CREATE TABLE users(id INTEGER AUTOINCREMENT, name TEXT, address TEXT, phone INTEGER, email TEXT PRIMARY KEY, password TEXT, career_objectives TEXT, technical_skills TEXT, work_experience TEXT, hobbies TEXT)

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
near "(": syntax error (code 1): , while compiling: CREATE TABLE ( _id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT, password TEXT, firstname TEXT, lastname TEXT, dob TEXT);

Solution icon of stackoverflow
via Stack Overflow by Chii
, 1 year ago
near ",": syntax error (code 1): , while compiling: CREATE TABLE villes(code_postal INTEGER PRIMARY KEY,nom_ville TEXT,

Solution icon of stackoverflow
near "TEXT": syntax error (code 1): , while compiling: CREATE TABLE user (id INTEGER PRIMARY KEY, fname TEXT, lname TEXT, check TEXT)

Solution icon of stackoverflow
near "TABLEusers": syntax error (code 1): , while compiling: CREATE TABLEusers(idnumber INTEGER PRIMARY KEY, nameTEXT, email TEXT, password TEXT )

Solution icon of stackoverflow
near "TABLE": syntax error (code 1): , while compiling: CREATE TABLE TABLE DATA (ID integer primary key autoincrement,USERNAME text,PASSWORD text,WEIGHT integer,HEIGHT integer,AGE integer,GENDER integer,CALORIES integer,CALORIES_BURNED integer,CALORIES_PEDO integer );

Solution icon of stackoverflow
near "+": syntax error (code 1): , while compiling: CREATE TABLE wishes(+id INTEGER PRIMARY KEY, title TEXT, content TEXT, recorddate LONG);

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
near "from": syntax error (code 1): , while compiling: create table timetables (id integer primary key autoincrement,name text,from text,to text,days text,sound text,indicator text);

Solution icon of stackoverflow
near "(": syntax error (code 1): , while compiling: CREATE TABLE (id integer primary key autoincrement,username text not null,password text not null)

Stack trace

  • android.database.sqlite.SQLiteException: near "index": syntax error (code 1): , while compiling: CREATE TABLE users(index INTEGER PRIMARY KEY,user TEXT ,password TEXT) at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:898) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:509) at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58) at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31) at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1704) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1635) at com.wojciechliszka.projekt.DataBaseHelper.onCreate(DataBaseHelper.java:49) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187) at com.wojciechliszka.projekt.DataBaseHelper.getPasswrod(DataBaseHelper.java:101) at com.wojciechliszka.projekt.Login$1.onClick(Login.java:54) at android.view.View.performClick(View.java:4811) at android.view.View$PerformClick.run(View.java:20136) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5549) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

14 times, 1 month ago
27 times, 5 months ago
Once, 5 months ago
3 times, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
112 more bugmates