Question Linq querying DataTables

Lotok

Well-known member
Joined
Jan 17, 2012
Messages
198
Location
Scotland
Programming Experience
5-10
I am not great with linq and even after googling I am struggling, hoping someone can help.

TABLE1
Created from CSV
1 column, string format. Contains a numeric ID

TABLE 2
From SQL
30 columns (col 4 has ID matching table 1)
ID is double datatype


I need to compare the 2 tables, then only keep the rows from table 2 where the ID wasnt found in table 1.
I have tried a merge but the data type difference for ID produces an error. For some reason
VB.NET:
  dim found() as datarow = datatable.select("ID='" & ds.tables(0).itemarray(4) & "'")
finds nothing. The select doesnt work at all, stepping through I cant find why so thought LINQ may be the answer.

Many Thanks indeed
 
Back
Top