Ich habe verwendet db = this.getWritableDatabase(); im Konstruktor selbst, also habe ich keine bestimmte Öffnungs- oder Schließungsfunktion verwendet. Sollte ich?Aktualisierungsabfrage SQLite gibt Null-Zeiger-Ausnahme
public void changeCabLocation(String to_loc, String cab_id2) {
// TODO Auto-generated method stub
ContentValues val=new ContentValues();
val.put(cab_location, to_loc);
db.update(TB_cabs, val, cab_id+"="+cab_id2, null);
}
public void changeDriverLocation(String to_loc, String driver_id2) {
// TODO Auto-generated method stub
ContentValues val=new ContentValues();
val.put(driver_location, to_loc);
db.update(TB_drivers, val, driver_id+"="+driver_id2, null);
}
Bitte geben Sie die logcat teilen, erwähnen die spezifische Linie Ihre Fehler auftritt, und ein [MCVE]. –