Stored procedure returns int instead of result set

后端 未结 17 2011
说谎
说谎 2020-12-03 13:02

I have a stored procedure that contains dynamic select. Something like this:

ALTER PROCEDURE [dbo].[usp_GetTestRecords] 
    --@p1 int = 0, 
    --@p2 int =          


        
17条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 14:04

    If SQL Authentication is in place, verify that the user credential that is being used to connect Entity Framework to the database has the proper rights to read from CUSTOMERS table.

    When Entity Framework uses SQL Authentication to map complex objects (i.e stored procedures that SELECTs more than one column), if any of the tables from within such stored procedure don't have set up the Read permission, the mapping will result in returning INT instead of the desired Result set.

提交回复
热议问题