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

Failed to call stored procedure with output datetime parameters in SQL task

$
0
0

Hi,

I have a stored procedure like:

create PROCEDURE dbo.testProc
	-- Add the parameters for the stored procedure here
	@para1 datetime output
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

  set @para1 =GETDATE()
END
GO

and in SSIS, i created a SQL task with OLE DB connection calling this SP, the statement in SQL task is: exec testProc @para1=? OUTPUT, I want to retrieve the parameter @para1 to my SSIS variable "BusinessDate", the mapping is:

User::businessDate , OUTPUT , Date ,0 , -1

However, SSIS always gives the following error:

Error: 0xC002F210 at Get Business Date, Execute SQL Task: Executing the query "exec testProc @para1=? OUTPUT" failed with the following error: "Error HRESULT E_FAIL has been returned from a call to a COM component.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Task failed: Get Business Date

Can anybody help me out?

Thank you

 


Liang(China) From SAP

Viewing all articles
Browse latest Browse all 24688

Trending Articles



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