Hi jxbma;
The query you are trying to execute and fill its results into a DataTable with will not work. The syntax for the CopyToDataTable is as follows :
Public Shared Function CopyToDataTable(Of T As DataRow) ( _
source As IEnumerable(Of T) _
) As DataTable
But what you have is the following :
var query = (from pax in ListOfItems
from pInfo in Information
where pax.Value == pInfo.Key.TravelerID
select new { pax.Key.FirstName,
pax.Key.LastName,
pax.Key.IsFreePlace,
pInfo.Value });
Which the type of the query is of Anonymous type as can be seen from the select clause where you use the keyword new without a type. When you query two List the results is of some List or IEnumerable. There is no function that will convert a List to a DataRow of a DataTable.
The solution will be to loop through the results and create a DataRow from the DataTable for each element of the result set.
Fernando