SQLiteDatabase.OpenDatabase 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.
Overloads
OpenDatabase(File, SQLiteDatabase+OpenParams) |
Open the database according to the specified |
OpenDatabase(String, SQLiteDatabase+ICursorFactory, DatabaseOpenFlags) |
Open the database according to the specified |
OpenDatabase(String, SQLiteDatabase+ICursorFactory, DatabaseOpenFlags, IDatabaseErrorHandler) |
Open the database according to the specified |
OpenDatabase(File, SQLiteDatabase+OpenParams)
Open the database according to the specified OpenParams parameters
[Android.Runtime.Register("openDatabase", "(Ljava/io/File;Landroid/database/sqlite/SQLiteDatabase$OpenParams;)Landroid/database/sqlite/SQLiteDatabase;", "", ApiSince=27)]
public static Android.Database.Sqlite.SQLiteDatabase? OpenDatabase (Java.IO.File path, Android.Database.Sqlite.SQLiteDatabase.OpenParams openParams);
[<Android.Runtime.Register("openDatabase", "(Ljava/io/File;Landroid/database/sqlite/SQLiteDatabase$OpenParams;)Landroid/database/sqlite/SQLiteDatabase;", "", ApiSince=27)>]
static member OpenDatabase : Java.IO.File * Android.Database.Sqlite.SQLiteDatabase.OpenParams -> Android.Database.Sqlite.SQLiteDatabase
Parameters
- path
- File
path to database file to open and/or create.
<p><strong>Important:</strong> The file should be constructed either from an absolute path or
by using android.content.Context#getDatabasePath(String)
.
- openParams
- SQLiteDatabase.OpenParams
configuration parameters that are used for opening SQLiteDatabase
Returns
the newly opened database
- Attributes
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
OpenDatabase(String, SQLiteDatabase+ICursorFactory, DatabaseOpenFlags)
Open the database according to the specified OpenParams parameters
[Android.Runtime.Register("openDatabase", "(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;I)Landroid/database/sqlite/SQLiteDatabase;", "")]
public static Android.Database.Sqlite.SQLiteDatabase? OpenDatabase (string path, Android.Database.Sqlite.SQLiteDatabase.ICursorFactory? factory, Android.Database.Sqlite.DatabaseOpenFlags flags);
[<Android.Runtime.Register("openDatabase", "(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;I)Landroid/database/sqlite/SQLiteDatabase;", "")>]
static member OpenDatabase : string * Android.Database.Sqlite.SQLiteDatabase.ICursorFactory * Android.Database.Sqlite.DatabaseOpenFlags -> Android.Database.Sqlite.SQLiteDatabase
Parameters
- path
- String
path to database file to open and/or create.
<p><strong>Important:</strong> The file should be constructed either from an absolute path or
by using android.content.Context#getDatabasePath(String)
.
- factory
- SQLiteDatabase.ICursorFactory
an optional factory class that is called to instantiate a cursor when query is called, or null for default
- flags
- DatabaseOpenFlags
to control database access mode
Returns
the newly opened database
- Attributes
Exceptions
if the database cannot be opened
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
OpenDatabase(String, SQLiteDatabase+ICursorFactory, DatabaseOpenFlags, IDatabaseErrorHandler)
Open the database according to the specified OpenParams parameters
[Android.Runtime.Register("openDatabase", "(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;ILandroid/database/DatabaseErrorHandler;)Landroid/database/sqlite/SQLiteDatabase;", "")]
public static Android.Database.Sqlite.SQLiteDatabase? OpenDatabase (string path, Android.Database.Sqlite.SQLiteDatabase.ICursorFactory? factory, Android.Database.Sqlite.DatabaseOpenFlags flags, Android.Database.IDatabaseErrorHandler? errorHandler);
[<Android.Runtime.Register("openDatabase", "(Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;ILandroid/database/DatabaseErrorHandler;)Landroid/database/sqlite/SQLiteDatabase;", "")>]
static member OpenDatabase : string * Android.Database.Sqlite.SQLiteDatabase.ICursorFactory * Android.Database.Sqlite.DatabaseOpenFlags * Android.Database.IDatabaseErrorHandler -> Android.Database.Sqlite.SQLiteDatabase
Parameters
- path
- String
path to database file to open and/or create.
<p><strong>Important:</strong> The file should be constructed either from an absolute path or
by using android.content.Context#getDatabasePath(String)
.
- factory
- SQLiteDatabase.ICursorFactory
an optional factory class that is called to instantiate a cursor when query is called, or null for default
- flags
- DatabaseOpenFlags
to control database access mode
- errorHandler
- IDatabaseErrorHandler
the IDatabaseErrorHandler obj to be used to handle corruption when sqlite reports database corruption
Returns
the newly opened database
- Attributes
Exceptions
if the database cannot be opened
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.