none
DataTable with select or compute query in C# RRS feed

  • Question

  • I want to query data on dataTable using datatable.select() 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

Answers

  • 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.

     

    http://msdn.microsoft.com/en-us/library/bb386977.aspx

    and this as well

    http://msdn.microsoft.com/en-us/library/bb552415.aspx

     

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

     

    Thanks

    Chris Robinson

    Program Manager - DataSet

    Tuesday, November 18, 2008 11:32 PM