mardi 28 avril 2015

issue creating Multiple tables in android [duplicate]

This question already has an answer here:

Im having an issue creating 2 tables, This first get created no problem, but the second(TABLE_BELLS), is not being created.

Logcat keeps saying No Such Table

Why does the first table get created but the second doesn't??

Your help would be much appreciated.

@Override
public void onCreate(SQLiteDatabase db) {

    db.execSQL("CREATE TABLE " + TABLE_USERINFO + " (" + USER_INFO_COLUMN_ID + " integer primary key autoincrement, "
           + USER_INFO_COLUMN_APP_NAME + " text, " + USER_INFO_COLUMN_DEVICE_NUMBER + " text );");

    db.execSQL("CREATE TABLE " + TABLE_BELLS + " (" + BELLS_COLUMN_ID + " integer primary key autoincrement, "
            + BELLS_COLUMN_FROM + " text, " + BELLS_COLUMN_MESSAGE + " text, " + BELLS_COLUMN_DATE_TIME + " text );");



}

Aucun commentaire:

Enregistrer un commentaire