samedi 3 octobre 2015

Android row is not getting update

I want to update the row values with 0 or 1. Here is my update method.Where is wrong with my code .

dbhelper.updateStarFlag(actid, strStarFlagMark);

     public boolean updateStarFlag(String str_ActivityId, String str_StarFlag)
        {
            SQLiteDatabase db1 = getReadableDatabase();
            ContentValues args = new ContentValues();
            args.put(COL_AllPost_PostActivityId, str_ActivityId);
            args.put(COL_AllPost_StarFlag, str_StarFlag);
            int i = db1.update(Table_AllPost_Table, args, COL_AllPost_PostActivityId + "='"+str_ActivityId+"'", null);
            return i > 0;
        }

Aucun commentaire:

Enregistrer un commentaire