Replace single quote for two single quotes, and it will work
string filter = @"DestinationName = '" + destinationName.Replace("'", "''") + "'";
DataRow[] drs = _ds.Tables[0].Select(filter);
foreach (DataRow dr in drs)
{
...
}
No comments:
Post a Comment