update sql database with ContentValues and the update-method

后端 未结 4 1976
醉酒成梦
醉酒成梦 2020-11-30 09:55

I would like to update my SQL lite database with the native update-method of the SQLiteDatabase class of android.

ContentValues dataToInsert = new ContentVal         


        
4条回答
  •  清歌不尽
    2020-11-30 10:35

    Actually what exactly you written is correct. The syntax is correct. But you have to check these. String where = "id" + "=" + id; In the above declaration "id" should be type number and id should be int. And if id is a type of TEXT then follow @Adam javin answer.

提交回复
热议问题