Android 已达到数据库的已编译sql语句缓存的最大大小
我有以下错误:Android 已达到数据库的已编译sql语句缓存的最大大小,android,sqlite,max-size,Android,Sqlite,Max Size,我有以下错误: 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 value
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);
}
这在哪里发生的。我在您的sqlite查询中看到很多错误 这可能会给你一个机会?问题:
"_ID=="+byid
应该是:
...,"_ID=?",new String[]{byid},...
这在哪里发生的。我在您的sqlite查询中看到很多错误 这可能会给你一个机会?问题:
"_ID=="+byid
应该是:
...,"_ID=?",new String[]{byid},...