Click here to Skip to main content
15,886,773 members

Comments by dmcgill50 (Top 2 by date)

dmcgill50 13-Nov-12 18:20pm View    
OK, seriously...I've gotten two pieces of feedback on a single solution post. The first one wanted to know how I "found" a question that was 2.5 years old. Answer: I used the ability to filter to a certain of question answered. Not that difficult and it appears as if that is what's intended by the developer of the site. ;)
Second told me not to answer questions that are too old as the OP won't care. I wasn't the OP and I cared, so I assume that those behind me will care. These Q&As aren't just for the OP. That should be obvious...
dmcgill50 13-Nov-12 18:13pm View    
Dim items = From a In dt.AsEnumerable() _
Join b In dtLossEvents.AsEnumerable() On _
a.Field(Of Integer)("EventID") Equals b.Field(Of Integer)("EventID") _
Select New With { _
.Gross_Loss = dt("Gross_Loss"), _
.Net_Loss = dt("Net_Loss"), _
.EventID = dtLossEvents("EventID") _
}



Dim result As DataTable = items.CopyToDataTable()


should be

Dim items = From a In dt.AsEnumerable() _
Join b In dtLossEvents.AsEnumerable() On _
a.Field(Of Integer)("EventID") Equals b.Field(Of Integer)("EventID") _
Select New With { _
.Gross_Loss = a("Gross_Loss"), _
.Net_Loss = a("Net_Loss"), _
.EventID = b("EventID") _
}



Dim result As DataTable = items.CopyToDataTable()