public string escapeSQLString(string sqlString)
{
string escapedString = sqlString;
switch ( this.repositoryType)
{
case RepositoryType.MYSQL:
case RepositoryType.POSTGRES:
// replace backslash "\" by double backslash "\\"
escapedString = escapedString.Replace(@"\",@"\\");
break;
}
// ALL DBMS types: replace the single qoutes "'" by double single quotes "''"
escapedString = escapedString.Replace("'","''");
return escapedString;
}