I use a database with multiple tables in my application. I have an XML parser which needs to write data to two tables while parsing. I created two database adapters for both tab
I'm a bit late maybe but i always open my database, not my table. So this form me as no sense.
firstTable.open();
secondTable.open();
Rather do this.
dataBase.getWritableDatabase();
then if you want to update juste chose the table:
public int updateTotal (int id, Jours jour){
ContentValues values = new ContentValues();
values.put(COL_TOTAL,Total );
//update the table you want
return bdd.update(TABLE_NAME, values, COL_JOUR + " = " + id, null);
}
And that's all. Hope it can help other people