Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试连接到存储过程作为数据源时出现此错误:
无法完成操作 存储过程未返回任何结果。字段没有列名,或者字段中的数据不是受支持的数据类型
但是相同的存储过程返回数据库中的数据。对此有任何想法吗?
请尝试SET NOCOUNT ON在存储过程的开头添加代码。
SET NOCOUNT ON
就像是
CREATE PROCEDURE [dbo].[ZZZ_THIS_IS_MY_SP] @p INT AS BEGIN SET NOCOUNT ON DECLARE @Var1 NVARCHAR(20) DECLARE @Var2 DATETIME -- All other instructions... END