Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Getting Output from Executing Stored Procedure in SSIS

$
0
0

Hi,

Anyone able to help with this:

I have a SQL Stored Procedure with this:

USE [MyDB]
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.



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>