DataTable with select or compute query in C# RRS feed

  • Question

  • I want to query data on dataTable using or datatable.compute() or the other funtion (the way you know), but the PARAMETER in select(...), I want use with long query. Example: "select * where columB <= 8, oderby, groupby, columA > 10,...".

    How I can to do this? Pls help me.
    Monday, November 17, 2008 1:22 PM


  • The specific expression query you want to do is invalid because of the group by.


    There is however an alternate way to accomplish this, you can use the Linq to DataSet which includes support for groupBy. If you are running a version of the .net Framework which is higher than 3.5 or you can access this feature. Here is a link that describes what it is. A short definition of it is a way to write a query over data that is a list.


    and this as well


    The are many samples about how to use Linq To Dataset. Please let us know if you have any specific questions there.



    Chris Robinson

    Program Manager - DataSet

    Tuesday, November 18, 2008 11:32 PM