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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -