0

我有以下错误:

reached max size for compiled sql statement cache for database  no space for this 
sql statement in cache select number  code status time id from contacts number 
please change your sql statements to use "?" for bindargs of using actual values

这是我的代码:

    public long updateNumber(String NUMBER,String CODE,String STATUS,String TIME){
    ContentValues initialValuesCode = new ContentValues();
    initialValuesCode.put(codeOperator, CODE);
    initialValuesCode.put(status, STATUS);
    initialValuesCode.put(time,TIME);
    String prom="0"+NUMBER.substring(0,8);

    return db.update(Database_Table_Number, initialValuesCode, "NUMBER=?", new       String[{prom});

}


public Cursor getNumberById(String id_par)
{

   return db.query(Database_Table_Number, new String[]{number,codeOperator,status,time,id}, "_ID=?", new String[]{id_par}, null, null, null);
       }
      public Cursor getAllNumbers()
      {
   return db.query(Database_Table_Number, new String[]{number}, null, null, number, null, null);
      }
      public Cursor getAllContacts() 
  {
    return db.query(Database_Table_Name, new String[] {id,name}, null, null, null, null, "DISPLAY_NAME asc" );

}
  public Cursor getDate(String byid){
    return db.query(Database_Table_Number, new String[] {time}, "_ID=="+byid, null, null, null, null);
}
   public Cursor isEpmty(){
    return db.rawQuery("SELECT COUNT(*) FROM ContactsName", null);
}
4

1 回答 1

3

这发生在哪里。我在您的 sqlite 查询中看到很多错误...

这也许给了你?问题:

 "_ID=="+byid 

应该:

 ...,"_ID=?",new String[]{byid},...
于 2011-06-14T08:41:13.237 回答