16,017,833 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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()