我试图将变量传递给我设置的存储过程,我将它们映射到参数映射选项卡中。我想我可能有不正确的语法,但我找不到解决方案。使用sql任务将参数传递给存储过程
EXEC [dbo].[proc_GetQuarterlyEmailId]
@employeeNumber = ?,
@employeeFirstName = ?,
@employeeLastName = ?,
@employeeEmail = ?
我得到的错误是:
Executing the query "EXEC [dbo].[proc_GetQuarterlyEmailId] @employeeNu..." failed with the following error: "Could not find stored procedure ''.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
如果我从存储过程中删除参数,并删除它运行完全正常的参数映射,所以我知道它可以找到它。我正在使用ADO.NET连接。
感谢您的回答!但我试过了,它仍然给我同样的错误。结果集被设置为“单行”,因为这是我在SP工作时得到的结果。 – rycekrispies
您是否在使用“执行SQL任务”转换?如果是这样,你可以添加“参数映射”和“结果集”设置的屏幕截图,因为这些都导致我在过去的问题 – MiguelH
参数映射不同,你正在使用哪种连接类型。 –