I have this row filter text: "[Name 1] = '" + forename + "%" + surname + "'" which fails, but if I put the % at the beginning or end it’s OK. Is there any way to achieve the same result (i.e. “any” string in the middle of the names)?
Full statement is:
dv = new DataView(MyDataTable,
"[Name 1] = '" + forename + "%" + surname + "'",
"", DataViewRowState.CurrentRows);
Just a free thougth, try:
EDIT: some documentation:
“A wildcard is allowed at the start and end of a pattern, or at the end of a pattern, or at the start of a pattern. […] Wildcard characters are not allowed in the middle of a string. For example, ‘te*xt’ is not allowed.”
My guess would be it’s for performance reasons (?)