Android.Database.Sqlite.SQLiteQueryBuilder.SetStrict Method
When set, the selection is verified against malicious arguments.

Syntax

[Android.Runtime.Register("setStrict", "(Z)V", "GetSetStrict_ZHandler")]
public virtual void SetStrict (bool flag)

Parameters

flag
Documentation for this section has not yet been entered.

Remarks

When set, the selection is verified against malicious arguments. When using this class to create a statement using SQLiteQueryBuilder.BuildQueryString(bool, System.String, System.String, System.String, System.String, System.String, System.String, System.String), non-numeric limits will raise an exception. If a projection map is specified, fields not in that map will be ignored. If this class is used to execute the statement directly using SQLiteQueryBuilder.Query(SQLiteDatabase, System.String[], System.String[], System.String[], System.String[], System.String[], System.String[]) or SQLiteQueryBuilder.Query(SQLiteDatabase, System.String[], System.String[], System.String[], System.String[], System.String[], System.String[], System.String[]), additionally also parenthesis escaping selection are caught. To summarize: To get maximum protection against malicious third party apps (for example content provider consumers), make sure to do the following:

  • Set this value to true
  • Use a projection map
  • Use one of the query overloads instead of getting the statement as a sql string
By default, this value is false.

[Android Documentation]

Requirements

Namespace: Android.Database.Sqlite
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 14