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

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -