Using ContentValues
uses variable binding behind the scenes. So yes, it's not vulnerable to the usual SQL injections.
Content Values and SQL injection
-
09-10-2022 - |
Frage
Does this construction prevent SQL-injection?
ContentValues localContentValues = new ContentValues();
localContentValues.put("some_column", StringFromUser);
localSQLiteDatabase.update("some_table", localContentValues, null, null);
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow