Android.Database.DatabaseUtils.AppendEscapedSQLString Method
Appends an SQL string to the given StringBuilder, including the opening and closing single quotes.

Syntax

[Android.Runtime.Register("appendEscapedSQLString", "(Ljava/lang/StringBuilder;Ljava/lang/String;)V", "")]
public static void AppendEscapedSQLString (Java.Lang.StringBuilder sb, string sqlString)

Parameters

sb
the StringBuilder that the SQL string will be appended to
sqlString
the raw string to be appended, which may contain single quotes

Remarks

Appends an SQL string to the given StringBuilder, including the opening and closing single quotes. Any single quotes internal to sqlString will be escaped. This method is deprecated because we want to encourage everyone to use the "?" binding form. However, when implementing a ContentProvider, one may want to add WHERE clauses that were not provided by the caller. Since "?" is a positional form, using it in this case could break the caller because the indexes would be shifted to accomodate the ContentProvider's internal bindings. In that case, it may be necessary to construct a WHERE clause manually. This method is useful for those cases.

[Android Documentation]

Requirements

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