LINQ errors

Error:

  • ‘First’ is not a member of ‘System.Data.EnumerableRowCollection(Of System.Data.DataRow)
  • “Definition of method ‘GroupBy’ is not accessible in this context”
  • ‘ToList’ is not a member of ‘System.Linq.Iqueryable(Of T)’

Solution:
Imports System.Linq
Also ensure that the DataSet is up to date. Use Run Custom Tool on the DataSet to ensure this.
Then ensure there is a reference to “System.Data.DataSetExtensions”.

See MSDN “How to Create a LINQ Project”
http://msdn.microsoft.com/en-us/library/bb546156.aspx

See MSDN 101 LINQ Samples
http://msdn.microsoft.com/en-us/vbasic/bb688088

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: