Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting by group with null support
Message
From
20/09/2015 09:45:42
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Selecting by group with null support
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01624841
Message ID:
01624841
Views:
50
I have this command to select only the groups from a datatable:
' Group
loResult = loDataTable.AsEnumerable().GroupBy(Function(r) r.Field(Of Integer)(lcPrimaryKey)).[Select](Function(g) g.First()).CopyToDataTable
I just found out that this will generate an error if one of the values is a null.

Is there a way I can add support in this command for such situation?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform