Advertisement
Rodolfo_Urzua

Actualizar

Dec 10th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.49 KB | None | 0 0
  1.   }public void Actualizar(String id_gasto,String monto,String descripcion,String fecha,String categoria){
  2.         BaseHelper baseHelper = NEW BaseHelper(this,"Gasto02",NULL,1);
  3.         SQLiteDatabase sqLiteDatabase = baseHelper.getWritableDatabase();
  4.         String query = "UPDATE gastos SET monto = '"+monto+"',descripcion = '"+descripcion+"',fecha = '"+fecha+"',categoria = '"+categoria+"' WHERE id_gasto = '"+id_gasto+"'";
  5.         sqLiteDatabase.execSQL(query);
  6.         sqLiteDatabase.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement