Replacing single quote

sconlon

Active Member
Licensed User
Longtime User
When writing an address string to a SQLite database I need to replace a single quote with two single quotes so I tried the following code

B4X:
if address.contains("'") then address = address.replace("'","''")

However, I found that the replace didn't happen and the single quote remained.
I'm baffled!
 
Top