代码(1)在编译期间未找到列

时间:2015-01-25 06:55:45

标签: java android sqlite

public class sqlitedatahelper extends SQLiteOpenHelper {
     private static final String LOGTAG = "SMILE";
     private static final int DATABASE_VERSION = 1;

        // Database Name
         static final String DATABASE_NAME = "storesxis.db";

        // Contacts table name
         static final String TABLE_storesxis = "storesxis";


        static final String COLUMN_ID="id";
        static final String COLUMN_startx="startx";
       static final String COLUMN_starty="starty";
      static final String COLUMN_stopx="stopx";
         static final String COLUMN_stopy="stopy";
      //  private static final String COLUMN_Timetaken = "totaltime";




    static final String CREATE_TABLE = "CREATE TABLE " + TABLE_storesxis + "("
            + COLUMN_ID  + " INTEGER PRIMARY KEY AUTOINCREMENT ," + COLUMN_startx + " TEXT,"
            +  COLUMN_starty + " TEXT,"
            + COLUMN_stopx + " TEXT," + COLUMN_stopy +  " TEXT" + ")";



    public sqlitedatahelper(Context context) {

        super(context, DATABASE_NAME , null, DATABASE_VERSION);
        // TODO Auto-generated constructor stub
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
         db.execSQL(CREATE_TABLE);
         Log.i(LOGTAG, "hello table is created");
        // TODO Auto-generated method stub

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
        db.execSQL("DROP TABLE IF EXISTS" + TABLE_storesxis );
        onCreate(db);
        // TODO Auto-generated method stub

    }

}

我有执行项目系统的代码问题没有找到列stopx这是帮助类dnt知道它真的有什么问题.........最初当我创建表时没有值表已经成功创建但是当我试图传递值时会导致问题..... 这是我的完整代码由4个类组成我尝试将轴存储在画布上的开始n结束点但现在在初始阶段我正在使用静态数据但是有问题尝试按照教程来存储数据但是有这个问题。 ..任何一个如果亲切地检查这个代码,让我知道问题和解决方案,我将非常感谢他......

0 个答案:

没有答案