SQLiteDatabase.ExecPerConnectionSQL(String, Object[]) 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.
Execute the given SQL statement on all connections to this database.
[Android.Runtime.Register("execPerConnectionSQL", "(Ljava/lang/String;[Ljava/lang/Object;)V", "GetExecPerConnectionSQL_Ljava_lang_String_arrayLjava_lang_Object_Handler", ApiSince=30)]
public virtual void ExecPerConnectionSQL (string sql, Java.Lang.Object[]? bindArgs);
[<Android.Runtime.Register("execPerConnectionSQL", "(Ljava/lang/String;[Ljava/lang/Object;)V", "GetExecPerConnectionSQL_Ljava_lang_String_arrayLjava_lang_Object_Handler", ApiSince=30)>]
abstract member ExecPerConnectionSQL : string * Java.Lang.Object[] -> unit
override this.ExecPerConnectionSQL : string * Java.Lang.Object[] -> unit
Parameters
- sql
- String
The SQL statement to be executed. Multiple statements separated by semicolons are not supported.
- bindArgs
- Object[]
The arguments that should be bound to the SQL statement.
- Attributes
Remarks
Execute the given SQL statement on all connections to this database.
This statement will be immediately executed on all existing connections, and will be automatically executed on all future connections.
Some example usages are changes like PRAGMA trusted_schema=OFF
or functions like SELECT icu_load_collation()
. If you execute these statements using #execSQL
then they will only apply to a single database connection; using this method will ensure that they are uniformly applied to all current and future connections.
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.