you can join 2 tables with LINQ this way, but it'll only list the shelves that contain books:
vb Code:
Dim query = From A In ds.Tables("dtShelfs").AsEnumerable _ Join B In ds.Tables("dtBooks").AsEnumerable On _ A.Field(Of Integer)("shelfID") Equals B.Field(Of Integer)("shelfUsed") _ Select New With { _ .ShelfID = A.Field(Of Integer)("shelfID"), _ .ShelfLocation = A.Field(Of String)("shelfLocation"), _ .ShelfClassification = A.Field(Of String)("shelfClassification"), _ .BookName = B.Field(Of String)("bookName")}




Reply With Quote