Language

DatabaseOpenFlags Enum

Definition

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum DatabaseOpenFlags
[<System.Flags>]
type DatabaseOpenFlags = 
Inheritance
DatabaseOpenFlags
Attributes

Fields

Name Value Description
OpenReadwrite 0

Open flag: Flag for openDatabase(File, OpenParams) to open the database for reading and writing. If the disk is full, this may fail even before you actually write anything.

Note that the value of this flag is 0, so it is the default.

Android reference for android.database.sqlite.SQLiteDatabase.OPEN_READWRITE.

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.

OpenReadonly 1

Open flag: Flag for openDatabase(File, OpenParams) to open the database for reading only. This is the only reliable way to open a database if the disk may be full.

Android reference for android.database.sqlite.SQLiteDatabase.OPEN_READONLY.

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.

NoLocalizedCollators 16

Open flag: Flag for openDatabase(File, OpenParams) to open the database without support for localized collators.

This causes the collator LOCALIZED not to be created. You must be consistent when using this flag to use the setting the database was created with. If this is set, setLocale(Locale) will do nothing.

Android reference for android.database.sqlite.SQLiteDatabase.NO_LOCALIZED_COLLATORS.

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.

CreateIfNecessary 268435456

Open flag: Flag for openDatabase(File, OpenParams) to create the database file if it does not already exist.

Android reference for android.database.sqlite.SQLiteDatabase.CREATE_IF_NECESSARY.

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.

EnableWriteAheadLogging 536870912

Open flag: Flag for openDatabase(File, OpenParams) to open the database file with write-ahead logging enabled by default. Using this flag is more efficient than calling enableWriteAheadLogging(). Write-ahead logging cannot be used with read-only databases so the value of this flag is ignored if the database is opened read-only.

Android reference for android.database.sqlite.SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING.

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.

Remarks

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.

Applies to