Error:
System.Data.SqlClient.SqlException: SELECT permission for object ' Dentists ' (Database ' dentists ', owner ' dbo ') was denied.
At System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior cmdbehavior, Runbehavior Runbehavior, Boolean Returnstream)
At System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior behavior)
At System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader (CommandBehavior behavior)
Solution:
In the database in the appropriate user rights, the Db_denydatareader check box to remove the tick.
Many beginners always think that the more permissions are selected in the database, the greater the privileges. In fact, this is wrong.
Db_denydatareader is denying access to query data. Similarly, Db_denydatawrite is refusing to perform a DML operation.
--------------------
Resolution 1. Delete the asp.net user in the engraved database
Solved 2.
Select permission denied for object ' users ' (database ' People ', schema ' dbo ')
Issue: Remote login is not allowed under SQL Server 2005 default settings
1 Peripheral settings TCP/IP and named pipe enabled simultaneously
2 Server--〉 Properties--〉 Security--〉sql Server and Windows Authentication mode
Issue: SELECT permission for object ' xxx ' (database ' xxx ', schema ' dbo ') is denied.
Answer: Database (XXX)---> Security----> Schema---->dbo (properties)---> Permissions---> Add---> Browse-->public Add a Select
Issue: Remote login is not allowed under SQL Server 2005 default settings
1 Peripheral settings TCP/IP and named pipe enabled simultaneously
2 Server--〉 Properties--〉 Security--〉sql Server and Windows Authentication mode
Issue: SELECT permission for object ' xxx ' (database ' xxx ', schema ' dbo ') is denied.
Answer: Database (XXX)---> Security----> Schema---->dbo (properties)---> Permissions---> Add---> Browse-->
[public]----> has grant permission (select)
Organize and reprint Qingdao Network company: http://www.toorain.net