views:

16

answers:

0

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 left join, that can yield empty values, which should be converted to DBNull.Value.

I've read a lot of Linq in the last days, but couldn't find the solution, mainly because the user selects the fields in each table at runtime.

Now the delivery time is over, so I'm going to write a stupid algorithm using Ado.Net. However, this is not the final version, and, since I hate to write stupid things, I'll appreciate any help.

The selection criteria is in the formList<Subject>, where each Subject member has to properties: TableName and ColumnNumber. The creation method guarantees that the list is sorted, and there are no duplicates.