I have the following code used to search the data in the dataset:
DataRow[] filteredRows =
myDS
.Tables["Inventory"]
.Select(string.Format("Make LIKE '%{0}%'", keyword));
however, if the keyword contains data such as O'Henry then above command will failed. I can get over this with parameterized with SQLCommand. But I have no idea how to use parameterized with dataset.
Any idea, please?
You need to replace
'with''. (two single-quote characters)