SqlException (0x80131904): Invalid object name 'dbo.Categories'

后端 未结 5 580
我寻月下人不归
我寻月下人不归 2020-12-03 07:47

I am getting the exception above when I run an application. The application is using asp.net mvc 3 / C#. I made an mdf file and added it under App_Data folder in Visual Web

5条回答
  •  鱼传尺愫
    2020-12-03 08:32

    This usually means a simple configuration issue:

    • perhaps there genuinely is no such table
    • perhaps the table is there, but there is no dbo scheme (it might be in Fred.Categories)
    • perhaps the db is case-sensitive (which is fine), and the table is actually dbo.CATEGORIES

    Any of these will cause the above exception. In particular, you state:

    My database contains 6 tables and one of them is Category.

    Now to a machine, Category != Categories

提交回复
热议问题