Android.Database.Sqlite.SQLiteOpenHelper.WritableDatabase Property
Create and/or open a database that will be used for reading and writing.

Syntax

[System.Obsolete("deprecated")]
[get: Android.Runtime.Register("getWritableDatabase", "()Landroid/database/sqlite/SQLiteDatabase;", "GetGetWritableDatabaseHandler")]
public virtual SQLiteDatabase WritableDatabase { get; }

Value

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Android.Database.Sqlite.SQLiteExceptionif the database cannot be opened for writing

Remarks

Create and/or open a database that will be used for reading and writing. The first time this is called, the database will be opened and SQLiteOpenHelper.OnCreate(SQLiteDatabase), SQLiteOpenHelper.OnUpgrade(SQLiteDatabase, System.Int32, System.Int32) and/or SQLiteOpenHelper.OnOpen(SQLiteDatabase) will be called.

Once opened successfully, the database is cached, so you can call this method every time you need to write to the database. (Make sure to call SQLiteOpenHelper.Close when you no longer need the database.) Errors such as bad permissions or a full disk may cause this method to fail, but future attempts may succeed if the problem is fixed.

Database upgrade may take a long time, you should not call this method from the application main thread, including from Android.Content.ContentProvider.OnCreate.

[Android Documentation]

Requirements

Namespace: Android.Database.Sqlite
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1