How to update the old database file with the new database file in android? -
i having application uses sqlite .db in that. having existing database file in application . have have make connection , should download new .db file , have replace existing .db new .db file had downloaded.
i keeping .db file in assests folder of application . people saying readable folder , cant delete file folder .
so please let me know how solve problem .
you can change databasehelper class constructor updating database name,version number important.
public databasehelper(context context, string dbname, null, int dbversion)
{
super(context, dbname, null, dbversion); // todo auto-generated constructor stub }
instead of using this
public databasehelper(context context) { super(context, dbname, null, dbversion); // todo auto-generated constructor stub }
Comments
Post a Comment