none
problem querying ADO.NET dataview RRS feed

  • Question

  •  

    My problem is this: I have a datatable from which I need to select records based on string 'myString'(myString is not a variable)  from column GetValue.

     

    string expression = GetValue Like 'myString'

    view = new DataView(workTable);

    view.RowFilter = expression;

    return view;

     

    At first this worked; however, now I get every row under the sun, and I have no idea why. Is there a better way to do what I am doing?

    Monday, October 29, 2007 2:04 PM

Answers

  • If it worked before, make sure if you did not get any leading or trailing spaces in your column values. Spaces may affect result, but visually values would look the same

     

    Tuesday, October 30, 2007 10:47 AM
    Moderator