我从下面的查询中获取此logcat输出。我知道所有列都在我试图访问的表中。这个错误意味着什么?
11-23 23:33:48.207: ERROR/AndroidRuntime(16941): Caused by: android.database.sqlite.SQLiteException: bind or column index out of range: handle 0x2cc688
Cursor value = checkDB.rawQuery("SELECT * FROM table WHERE open='1' AND country='?'", new String[]{countryID});
答案 0 :(得分:2)
查询中的?
周围不需要引号。
答案 1 :(得分:-1)
尝试使用:
Cursor value=checkDB.query(table,new String[]{"*"},"open=1 and country="'"+countryID+"'",null,null,null,null);