View Single Post
  #1 (permalink)  
Old December 5th, 2010, 02:39 PM
ja11946 ja11946 is offline
Registered User
Join Date: Nov 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 9 Object not Queryable

Hi all,

I am getting this error message: Expression of type 'Object' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider.

I only get it on an existing project that I have. When I use another project with the exact syntax I don't get the error.

I have tried to look at the "add reference" and it seems like we are good to go there. Any suggestion are appreciated.

Here is the code, as outlined in the book. the "In movie" is generating the error.

Imports System.Collections.Generic
Imports System.Linq
Imports Microsoft.VisualBasic
Public Class FlashCards
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then

Dim movies = GetMovies()

Dim query = From m In movies _
Select m
Me.GridView1.DataSource = query
End If
End Sub