how do i filter rows comparing them to a variable ?
this works
// Filter the dataview
DataView myDataView = myDataSet.Tables["Customers"].DefaultView;
myDataView.RowFilter = "Country = Argentina ";
this doesnt work
// Filter the dataview
string arg = "Argentina";
DataView myDataView = myDataSet.Tables["Customers"].DefaultView;
myDataView.RowFilter = "Country = arg ";
i just got a (The variable arg is assigned but its value is never used)
warning.....
this works
// Filter the dataview
DataView myDataView = myDataSet.Tables["Customers"].DefaultView;
myDataView.RowFilter = "Country = Argentina ";
this doesnt work
// Filter the dataview
string arg = "Argentina";
DataView myDataView = myDataSet.Tables["Customers"].DefaultView;
myDataView.RowFilter = "Country = arg ";
i just got a (The variable arg is assigned but its value is never used)
warning.....