Hopefully some one will nmotice my 'obvious' mistake.

I have created 2 tables in the database (below). When I access table
c, no problem. But when I attempt to access table s I get an error
message that column name x (all names give the same error) does not
exist. How can 1 table get created but not the other?

public class updateDB extends SQLiteOpenHelper {

    private static final String CREATE_TABLE_S = "create table
"+DICT_TAB_1+" (_ID integer primary key autoincrement, COURSE_NAME
text not null, SCORE number not null,  PUTTS number not null, GIR
number not null, FWY number not null);";

    private static final String CREATE_TABLE_C = "create table
"+DICT_TAB_2+" (_ID integer primary key autoincrement, COURSE_NAME
text not null, TEES text not null,  SLOPE number not null, PAR number
not null);";

    public updateDB(Context ctx){

        super(ctx, DATABASE_NAME, null, DATABASE_VERSION);
    }



    @Override
    public void onCreate(SQLiteDatabase db){

        db.execSQL(CREATE_TABLE_COURSE);
        db.execSQL(CREATE_TABLE_SCORE);


    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion){
        db.execSQL("DROP TABLE IF EXISTS "+ DICT_TAB_1);
        db.execSQL("DROP TABLE IF EXISTS "+ DICT_TAB_2);
        onCreate(db);
    }


}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to