Using AsEnumerable() in Code Stage

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-11-18 01:52 PM
Hello,
I€™m building my own code stage and I would like to use AsEnumerable method on DataTable, something like below:
Dim CustomerOrders = DtWithRecords.AsEnumerable().Select(Function(row) row.Field(Of Decimal)("ORDERNO")).Distinct()
Unfortunately, I'm receiving an error:
Public member "AsEnumerable" on type "DataTable" not found.
I referenced System.Data.DataSetExtensions.dll on Initialise Page.
What I'm doing wrongly here?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-11-18 03:49 PM
Try adding namespace too

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-11-18 06:18 PM
Tried it before, unfortunately didn't solve the problem.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-11-18 08:18 PM
It's telling you that whatever class the DtWithRecords object is does not have a AsEnumerable method

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-11-18 06:28 PM
I know what is telling. Problem is that it shouldn't be a problem as I'm using System.Data.DataSetExtensions.dll on Initialise Page, which should be enough to use AsEnumerable on DataTable (and DtWithRecords is a Data Table).
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-11-18 01:23 PM
If you are using the LINQ query, then you should be refer below dll's and import the namespace:
:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Linq.dll
:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Core.dll
:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Data.DataSetExtensions.dll
Namespace: System.Linq
