An error occurred while executing the command definition. See the inner exception for details

前端 未结 9 1788
攒了一身酷
攒了一身酷 2020-12-15 03:07

In my mvc asp.net application, I am getting an error in edit function : in given code

public ActionResult Edit(int id)
{

      var res = (from r in objeEnti         


        
9条回答
  •  没有蜡笔的小新
    2020-12-15 03:21

    I had a similar situation with the 'An error occurred while executing the command definition' error. I had some views which were grabbing from another db which used current user security. The second db did not allow the login for the user of the first db causing this issue to occur. I added the db login to the server it was trying to get to from the original server and this fixed the issue. Check your views and see if there are any linked dbs which have different security than the db you are logging onto originally.

提交回复
热议问题