String.Replace(String,String) should work fine. In this example you need:
String.Replace("'", "''")
However, I do not think this will fix your problem. I think you are more suitably looking for:
String.Replace("'", "\'")
The reason for this is that MySQL, and I would have imagined other versions of SQL, expected rows to be enclosed in single quotes.
Dan ambrisco
source share