Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

edit data from database sqlite android

//Put this in your DAO or Activity

public void alteraTarefa(yourclass yourclass){
ContentValues contentValues=new ContentValues();
contentValues.put("yourdbcolumn",yourclass.getyourvaluefromclass());
contentValues.put("yourdbcolumn",yourclass.getyourvaluefromclass());
contentValues.put("yourdbcolumn",yourclass.getyourvaluefromclass());
db.update("yourtable",contentValues,"your_column_name_to_do_the_where="+ yourclass.getyourvaluefromclass(),null); /*<------ NOTE: if you do the where with a string instead of int you have to do the where with the '' */ 
}
 
PREVIOUS NEXT
Tagged: #edit #data #database #sqlite #android
ADD COMMENT
Topic
Name
4+9 =