So I have some simple code:
source.Filter = "n LIKE '%" + txtSearch.Text + "%'";
Source
being a BindingSource object.
txtSearch
being a TextBox.
What is the proper method to make sure it will always consider the contents of txtSearch.Text
as a string, and not crash every time I type a "(" or a number of other characters (not sure which yet).
Surely there must be a function somewhere to escape all these, or something?