Escaping the ' character
Posted: Fri Jan 07, 2011 8:34 am
How do I escape the ' character in the following code?
If the ChangeLog string has a ' in it, it's breaking the MySQL query.
Thanks.
Code: Select all
string command = "INSERT INTO anesthpcpref(PCName,ChangeLog) VALUES ('" + POut.String(thisPCName) + "','" + POut.String(ChangeLog) + "'" + ")";
DataCore.NonQ(command);Thanks.