Dan wrote: > thanks, so the onCreate gets called when the database has not been > created and the onupgrade gets called when the database has been > created, but the app is being upgraded?
Yes on the first. More accurately for the second, onUpgrade() will be called when the schema revision (parameter in the SQLiteOpenHelper constructor) changes. > Do these methods get called > due to some global variable that gets reset upon a fresh or upgraded > install of the app? No, they get called when you ask your SQLiteOpenHelper subclass to getWriteableDatabase(), for example. The determination of whether an upgrade is needed is based on some metadata tucked away in some corner of the database. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en