Android : Update query gives error on updating a string containing special symbol

on Thursday, January 8, 2015


I am using below query to update a certain row of my database & i am getting this error.


android.database.sqlite.SQLiteException: near "–": syntax error (code 1): , while compiling: UPDATE WorkFlow SET Name = 131568.0010 – EcoGreenWatch.org vs. Northern Plains Oil, Inc.12345 WHERE LocalId = 1


Previously i am getting this data in a listview from my sqlite database & now i want to update this data with the newly enterred string. The type of the row which has been updated is "TEXT". Any help would be appreciated.


myDatabase.rawQuery("UPDATE " + TABLE_WORKFLOW + " SET " + KEY_NAME + " = " + updatedName + " WHERE " + KEY_LOCALID + " = " + increementedCurrentPosition, null);


0 comments:

Post a Comment