Author: StevenF1976 | Posted on: 5/6/2009 9:04:49 AM | Views : 284

I am using LINQ to access tables from an SQL Server database, and need to be able to iterate over the values in several fields in each table, primarily in order to populate multidimensional arrays I need to do further computations. In previous versions of my application, I have used ADO to get a recordset back from the tables in the database, and then used nested loops through the various fields in the ADO recordset to populate the array variables.  However, I can?t figure out how to get at the results from a LINQ query.

A simplified version of one of my tables has the following format:


I then create a LINQ data context called ?LinqTestDataContext?, and use the following LINQ code to get all the contents of the ?Test_table? into a variable:

Dim newDataContext As New LinqTestDataContext()

Dim Go to the complete details ...