cursor.requery() - error

时间:2012-10-30 11:18:02

标签: android cursor simplecursoradapter

如何更新光标数据?  cursorComp.requery() - 引发错误

代码:

  void someTask() {
 try
 {
 JSONArray jArray = new JSONArray(result);
 for(int i=0;i<jArray.length();i++) 
  {
     JSONObject json_data = jArray.getJSONObject(i);
     extId = json_data.getString("id");
     nameComp = json_data.getString("name");
    db.addRec(nameComp,extId,compDescription,minPrice);
    //update cursor
    cursorComp.requery(); //This line generates an error
  }
 }
 }   

0 个答案:

没有答案