SQLiteDatabase.SetForeignKeyConstraintsEnabled(Boolean) Method

Definition

Sets whether foreign key constraints are enabled for the database.

[Android.Runtime.Register("setForeignKeyConstraintsEnabled", "(Z)V", "GetSetForeignKeyConstraintsEnabled_ZHandler")]
public virtual void SetForeignKeyConstraintsEnabled (bool enable);
[<Android.Runtime.Register("setForeignKeyConstraintsEnabled", "(Z)V", "GetSetForeignKeyConstraintsEnabled_ZHandler")>]
abstract member SetForeignKeyConstraintsEnabled : bool -> unit
override this.SetForeignKeyConstraintsEnabled : bool -> unit

Parameters

enable
Boolean

True to enable foreign key constraints, false to disable them.

Attributes

Exceptions

if the are transactions is in progress when this method is called.

Remarks

Java documentation for android.database.sqlite.SQLiteDatabase.setForeignKeyConstraintsEnabled(boolean).

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