Hi
I would like to know if there is a function to correctly escape string literals for filter expressions.
e.g.
DataTable.Select(String.Format("[name] = '{0}'", MyName))
If MyName contains ' or a number of other key characters an exception is generated. The Microsoft documentation indicates that these charaters should be correctly escaped, however there is a bit of confusion on how this is to be done.
I have tried replacing ' with \' and also ['] as indicated in the documentation, however the query still fails.
Many Thanks