SQLiteOpenHelper.OnOpen(SQLiteDatabase) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when the database has been opened.
[Android.Runtime.Register("onOpen", "(Landroid/database/sqlite/SQLiteDatabase;)V", "GetOnOpen_Landroid_database_sqlite_SQLiteDatabase_Handler")]
public virtual void OnOpen (Android.Database.Sqlite.SQLiteDatabase? db);
[<Android.Runtime.Register("onOpen", "(Landroid/database/sqlite/SQLiteDatabase;)V", "GetOnOpen_Landroid_database_sqlite_SQLiteDatabase_Handler")>]
abstract member OnOpen : Android.Database.Sqlite.SQLiteDatabase -> unit
override this.OnOpen : Android.Database.Sqlite.SQLiteDatabase -> unit
Parameters
The database.
- Attributes
Remarks
Called when the database has been opened. The implementation should check SQLiteDatabase#isReadOnly
before updating the database.
This method is called after the database connection has been configured and after the database schema has been created, upgraded or downgraded as necessary. If the database connection must be configured in some way before the schema is created, upgraded, or downgraded, do it in #onConfigure
instead.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.