Skip to content
Advertisement

i cant update value in SQLite

I have this table to sqlite:

JavaScript

And this is my method to Update value:

JavaScript
JavaScript

And i add a object variable in my activity:

JavaScript

So, in activity I use this to change value using update method:

JavaScript

But this not works because when I press the button:

JavaScript

Class:

JavaScript

Nothing happens because the value is (1) one all the time. What’s wrong with my code?

Advertisement

Answer

You must specify the id of the row that you want to update:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement