I have an html string I would like to store in my SQLite db “as is”. The special characters in the html string prevent my INSERT statement from storing it:
INSERT INTO myTable VALUES ('" + htmlString + "')
On iOS I used parameterized queries to accomplish this and it worked fine. How can I accomplish this on Android? I’ve Google parameterized queries for Android but the results were varied and unclear.
in Android you have parameterized queries too … are few way to achive this:
or
or
EDIT: (inserting multiple rows)
if you wana insert more than 1 row then do it in transaction (it should be quicker)
and prefer 2nd solution: