sqlite - Escaping SQL queries in C# -
i have program runs queries on sqlite db , want replace ' character in query ''.
the code using:
val.value.replace(',' '\'\ ')
but vs doesnt accept that, there different method?
the code below uses quotes (") encapsulate 2 parameters of replace statement. in case, first parameter single quote (') , second 2 single quotes (''). result in code below.
val.replace("'","''")
Comments
Post a Comment