private string LiteralFormat(string source, bool forceDelimit)
{
if (source == "'")
{
return "''";
}
for (int i = 0; i < source.Length && !forceDelimit; i++)
{
char ch = source[i];
forceDelimit = !(Char.IsLetter(ch) || ch == '.' || ch == '_' || ch == '-');
}
return forceDelimit ? "'" + source + "'" : source;
}