Hi,
Anyone able to help with this:
I have a SQL Stored Procedure with this:
GO
EXEC [dbo].[MyTable]
GO
If I run this is Management Studio it works and returns the following results:
Code (Header)
28
21
89
50
I want to get that list of results and use them in an Email Body within a SSIS Task, but its not working.
In SSIS Control Flow, I do an SQL Execute Task, add the SQL Statement, Resultset= Full Result set
Set the Result set properties: Result Name: 0 and Variable Name: User::MyVariable
But when I run the package, I get error: [Execute SQL Task] Error: Executing the query "USE [MyDB]
" failed with the following error: "No disconnected record set is available for the specified SQL statement.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly,
or connection not established correctly.
Any ideas how I resolve this?
I pass nothing to the Stored Procedure, but I want to use the resulting output from the SP pass into the SSIS Package to pass into the Body of the Send Mail Task which comes after this Stored Procedure.
Any help appreciated.