Note also that the OnUpgrade() method additionally accepts two int arguments. The first int argument is the current (installed) database version. The second int argument is the new (upgrade) database version. Public DataManagerHelper(Context context) specifies the database version (increment this number each time you make database related changes) private const int DatabaseVersion = 3 specifies the database name private const string DatabaseName = " myDatabaseName" Public class DataManagerHelper : SQLiteOpenHelper Your OnUpgrade() method should be coded so that it checks for the smallest (earliest) database version first and then gets successively higher, i.e., database upgrades should perform their changes on the earliest versions first and get progressively higher until they reach the penultimate database version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |