次の方法で共有


DatabaseUtils.CreateDbFromSqlStatements Method

Definition

Creates a db and populates it with the sql statements in sqlStatements.

[Android.Runtime.Register("createDbFromSqlStatements", "(Landroid/content/Context;Ljava/lang/String;ILjava/lang/String;)V", "")]
public static void CreateDbFromSqlStatements (Android.Content.Context? context, string? dbName, int dbVersion, string? sqlStatements);
[<Android.Runtime.Register("createDbFromSqlStatements", "(Landroid/content/Context;Ljava/lang/String;ILjava/lang/String;)V", "")>]
static member CreateDbFromSqlStatements : Android.Content.Context * string * int * string -> unit

Parameters

context
Context

the context to use to create the db

dbName
String

the name of the db to create

dbVersion
Int32

the version to set on the db

sqlStatements
String

the statements to use to populate the db. This should be a single string of the form returned by sqlite3's .dump command (statements separated by semicolons)

Attributes

Remarks

Creates a db and populates it with the sql statements in sqlStatements.

Java documentation for android.database.DatabaseUtils.createDbFromSqlStatements(android.content.Context, java.lang.String, int, java.lang.String).

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