I must update a row of a table in an Activity. I use a method of my class DatabaseHelper that extends SQLiteOpenHelper. Here is the method belonging to the class DatabaseHelper:
public void updateQuantitaProdotto(SQLiteDatabase db,String Nome, String Quantita) {
db.execSQL("update " + ProdottiTable.TABLE_NAME + " set " + ProdottiTable.QUANTITA + "= " + Quantita + "where "
+ "Nome = '" + Nome + "'");
}
I need to pass three parameters but I don't know which value giving as first parameter. When I want to create an SQLiteDatabase object I get an error on the editor, maybe I can't use it.
Aucun commentaire:
Enregistrer un commentaire