Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. [newbie] Linq cannot find the tablename..

[newbie] Linq cannot find the tablename..

Scheduled Pinned Locked Moved ASP.NET
csharphelptutoriallearningasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jon 80
    wrote on last edited by
    #1

    When running a tutorial project on LINQ, I'm getting an error: The table name property of LinqDataSource 'LinqDataSource1' must specify a table property or field on the data context type. I tried to set the TableName property to RegClient, which is the name of the actual table name of the database created within the project, however, VS does not seem to recognize it. From the horizontal dropdown next to LinqDataSource1.TableName the table name does not show up, which might mean that it was not configured. Any ideas? :confused: NOTE: Cannot paste code directly due to a network problem on the VM where the code resides. Reference book ASP.NET 3.5 - A Beginner's Guide written by William B. Sanders (2009).

    Jon

    A A 2 Replies Last reply
    0
    • J jon 80

      When running a tutorial project on LINQ, I'm getting an error: The table name property of LinqDataSource 'LinqDataSource1' must specify a table property or field on the data context type. I tried to set the TableName property to RegClient, which is the name of the actual table name of the database created within the project, however, VS does not seem to recognize it. From the horizontal dropdown next to LinqDataSource1.TableName the table name does not show up, which might mean that it was not configured. Any ideas? :confused: NOTE: Cannot paste code directly due to a network problem on the VM where the code resides. Reference book ASP.NET 3.5 - A Beginner's Guide written by William B. Sanders (2009).

      Jon

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      jon_80 wrote:

      When running a tutorial project on LINQ, I'm getting an error: The table name property of LinqDataSource 'LinqDataSource1' must specify a table property or field on the data context type.

      Can you please put the line of code?

      cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net

      1 Reply Last reply
      0
      • J jon 80

        When running a tutorial project on LINQ, I'm getting an error: The table name property of LinqDataSource 'LinqDataSource1' must specify a table property or field on the data context type. I tried to set the TableName property to RegClient, which is the name of the actual table name of the database created within the project, however, VS does not seem to recognize it. From the horizontal dropdown next to LinqDataSource1.TableName the table name does not show up, which might mean that it was not configured. Any ideas? :confused: NOTE: Cannot paste code directly due to a network problem on the VM where the code resides. Reference book ASP.NET 3.5 - A Beginner's Guide written by William B. Sanders (2009).

        Jon

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        If you use object of Table class, it is must to provide the actual table map attribute on the header. I think the DBML you made doesnt have the actual tables in the database. Just change the connectionstring and create the table structure as mentioned in the DBML. This error will wiped out automatically....

        Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
        Create .NET Templates

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups