My code is
ContentValues values;
values = new ContentValues();
values.put(SQLHelper.EMPLOYEE_LPN, jsObj.getString("lpn"));
db.update(SQLHelper.EMPLOYEE_TABLE, values,
"EMPLOYEE_LPN ='" + jsObj.getString("lpn") + "'",
null);
a warning is shown in the Log Cat
08-31 15:19:45.297: WARN/Database(2868): Reached MAX size for compiled-sql statement cache for database /data/data/org.sipdroid.sipua/databases/test.db; i.e.,
NO space for this sql statement in cache:
SELECT EMPLOYEE_NAME FROM eyemployee WHERE EMPLOYEE_LPN ='1169162'.
Please change your sql statements to use '?' for bindargs, instead of using actual values
How to resolve it?
Look at examples 8-3 and 8-4 here.
Example 8-3. Using the update method
Here are some of the highlights of the code in Example 8-3:
Example 8-4 shows you how to use the execSQL method.
Example 8-4. Using the execSQL method
The message is asking you to make parameters use sql variables instead of sql literals.
Each sql query is parsed, plans are generated, and stored in a sql statement cache.
Queries which have the same text are fetched from the cache.
Queries which have different text (including literals) cannot be found in the cache and are (uselessly) added to it.