I have created one application in that I made some mistake so when I am storing into database it is getting some error.
After I changed my program code and uploaded into playstore and users is updating but now also it is showing same error. where the problem is coming I didn't get, I thought that the table is not updating so my database onUpgrade method is like this
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_CONTACTS);
// Create tables again
onCreate(db);
}
how can I update the table means drops the old table and creates new table, then my application data that is stored in database will be lost I don't want loss of data.I am little bit confused, is there any change(option) like uninstall the application and install again from store side.
Aucun commentaire:
Enregistrer un commentaire