DataView not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
My DataView does not work, it return all the record in the dataset.
here is my code:
string rowFilterDept = "DEPT_NAME = '" + strDept + "'";
DataView dvDept = new DataView( dtDept, rowFilterDept, "DEPT_NAME",
DataViewRowState.CurrentRows );

I check the data in dataset is fine, strDept is the right value without
special character.
What could be wrong?

Thank you for you help.


Wes
 
Is it possible that DEPT_NAME is a char column as opposed to varchar?

If so, the spaces are signifigant.
 
Back
Top