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!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…