I'm trying to update a database using this query:
string query = "UPDATE pagine SET titolo= '" + pa.titolo + @"', contenuto = '" + pa.contenuto + @"' WHERE id= " + pa.id;
I can't get it working. More details are available at Updating an mdb database table
The problem might be the fact that i have some apostrophes in the title and the content. I tried using Regex.Escape but it just adds tons of \\\ to the content.
Is there any way to escape just the ' and " characters in ASP.NET?
Note: since i'm italian i use italian names for variables but i translated them for better clarity in the other question posted yesterday.