Wrox Programmer Forums
.NET 4.5.1 and Visual Studio 2013 General Discussions For discussing anything about .NET 4.5.1, WPF, WCF, the rest of the .NET 4.5.1 Framework, and Visual Studio 2013 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4.5.1 and Visual Studio 2013 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 20th, 2014, 01:08 PM
Authorized User
Join Date: Jul 2014
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb LINQ to Dataset (VB 2102)

I am trying to implement basic examples of LINQ to Dataset

ds is an existing, full dataset (one table)
PKName is the name of a COLUMN in the table
PKValue is the value of that column

Dim dt As DataTable = ds.Tables(0)

query = _
From ele In dt.AsEnumerable() _
Where ele.Field(Of Int16)(PKName) = PKValue _
Select ele

I want now to browse through the results.

for each e in query
next e

but the compiler claims "e is not a member of System.Data.DataRow

In fact, given "e" (a row in a table) I need the columns named prefix1, prefix2, prefix3....

I am stuck on it and would appreciate any guidance.

Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ to EF and LINQ to SQL sophia BOOK: Beginning ASP.NET 4 : in C# and VB 1 October 19th, 2011 12:16 PM
Writing to Excel from a dataset with VB.Net ruairi VB.NET 2002/2003 Basics 5 July 27th, 2009 12:07 PM
Dataset in vb.net thas123 .NET Framework 2.0 1 April 17th, 2007 06:46 AM
Dataset in vb.net thas123 .NET Framework 2.0 0 January 15th, 2007 04:35 AM
Converting a untyped dataset to a typed dataset daphnean Visual Studio 2005 0 July 13th, 2006 01:16 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.