I m 开发一种和一种roid,这是我第一次使用Q。
public static final String KEY_NAME="name";
public static final String KEY_TIME="time";
public static final String KEY_NUM="num";
public static final String KEY_PRICE="price";
private static final String DB_CREATE = "CREATE TABLE " + DB_TABLENAME + " ("
+ KEY_ID + " INTEGER PRIMARY KEY,"
+ KEY_NUM+" INTERGER,"
+ KEY_PRICE + " REAL,"
+ KEY_NAME + "TEXT,"
+ KEY_TIME +"TEXT)";
public Cursor fetchAllData(){
return yueDb.query(DB_TABLENAME, new String[]{KEY_ID,KEY_NUM,KEY_PRICE,KEY_NAME,KEY_TIME},null,null,null,null,null);
}
The code throws an error when it call fetchAllData()
. Eclipse tells me in the LogCat window:
qlite返回: 错误代码=1,msg=无 姓名
我知道这个问题涉及这一职能,但我确实能够发现我的法典在哪里是错误的。 如果是,请教我!