linq-to-dataset

Linq to Dataset - joining tables

I write a statistical application: I have a dataset with many tables; all of them have one key field (int) – the first field, and an unknown number of other fields (double). I already built an output table, with the same structure. I plan to join the tables that the user selects, iteratively, to the output table, one at a time. It's a l...

LINQ casting with a Data.DataTableCollection

I have the following VB.NET code that I am using to sort a Data.DataTable by column count. For Each dtTarget As Data.DataTable In _ From x In Target.Tables _ Where DirectCast(x, Data.DataTable).Rows.Count > 0 _ Order By DirectCast(x, Data.DataTable).Columns.Count ... Next Is there a way to indicate that x is a Data.DataTab...

Query a DataSet using LINQ

I have a DataSet that I fill with a SQL select query. I then need to perform an extra query on this DataSet to filter the data some more, using LINQ to DataSet. I then want to hook this LINQ result up to some Data Control (Repeater or GridView) It is not working so well though. Here is what I've tried so far: Dim sql As String = "SELEC...

Linq to DataTable not producing Distinct values

Hi, I have a datatable which has been dynamically generated from FoxPro tables using a UNION Select statement. e.g. SELECT * FROM x UNION SELECT * FROM y UNION SELECT * FROM Z ORDER By v_alue1 This produces a datatable with about 100 rows, each containing many fields, one of which is c_olor. From this datatable, I would like to selec...