reached max size for compiled sql statement cache for database
I have the following error:
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
This is my code:
public long updateNumber(String NUMBER,String CODE,String STATUS,String TIME){
ContentValues initialValuesCode = new ContentValues();
initialValuesCode.put(codeOperator, COD开发者_如何转开发E);
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);
}
where does this happen. i see a lot of errors in your sqlite queries...
this maybe gives you the ? issue:
"_ID=="+byid
should be:
...,"_ID=?",new String[]{byid},...
精彩评论