Error near ': there is a ' character in a field

In a SQLIte SQLExecute ("UPDATE … ") line, I get sometimes an error near '…

The user sometimes type a ’ in a field I pas as is. Is the following correct ? (it Compiles but crashed on a different location)

ReplaceAll(TF_SentBy.Text,"'","\\'")

I just checked in the internet before a click in Start Conversation and I found an entry at http://stackoverflow.com that says so (for Android). Is it OK for Xojo ?

Please use prepared statements. Than you don’t need Replaceall.

I was thinking… I already use it. I may forgot to add it in that part. I will check.

Thank you Christian.

Christian:

you were right: I do not added Prepared Statements there ! I will and while I am at it, I will check other parts of the project and add where needed. I certainly had a break the day I add Prepared Statements (a phone call, someone at my door but not at my window :-{, etc.) .