Morning chaps,
I'm currently migrating an old system into a new version of my application. The data I am trying to import is a list of addresses. Unfortunately many of those addresses contain a '.
When I put those into the filter I.e. SiteName = 'Bob's Shop', it obviously falls over because it thinks the filter should have ended at 'Bob'. How can I make the filter include that character? I have tried doing a find and replace on the filter values and replacing ' with \', but that doesn't seem to work either.
Unfortunately I have to keep that character, or I'd just strip it out.
Code:
1 string siteName = "Bob's Shop";
2
3 TblSiteCollection siteList = new TblSiteCollection();
4 siteList.Query.Where(siteList.Query.CompanyId.Equal(Settings.Default.CompanyId));
5 siteList.Filter = TblSiteMetadata.ColumnNames.SiteName+ "='" + siteName + "'";
Thanks in advance.
Current ES Projects:
iVirtualDocket - Remote engineer tracking and job assignments
HIS - Home insurance scripting system