For postgres, you also need to replace "\"

public string escape (string s)
{
s = s.Replace("\\", "\\\\"); // Replace \ with \\
s = s.Replace("\'", "\'\'"); // Replace ' with '' (SQL Standard)
//s = s.Replace("\"", "\\\""); not necessary if enclosed in single quotes.
return s;
}


Howard Cole
www.selestial.com

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to