General information
Title:
RowFilter with apostrophe
Environment versions
Network:
Windows 2003 Server
I've constructed a search tool to retreive subsets of data from an ADO.NET dataset. I construct a DataView and then set the RowFilter property to a value entered into a search for text box. Unfortunately, if the user is searching for anyone named "O'Brien" the apostrophe causes an error. I have been able to trap for other reserved characters (wild cards like % and *) by enclosing them in brackets but the only way I have been able to prevent a crash is by removing any apostrophe from the rowfilter string.
Is there any way to allow the dataview to filter for strings that INCLUDE the apostrophe? This is not a SQL error since I can construct a SQL SELECT which will include the apostrophe.
Thank you.
Rick Grinter
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only