![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I'm having some troubles using de Execute SQL Task. I have defined the following stored procedure: ALTER PROCEDURE dbo.sp_InsertDateImage AS BEGIN SET NOCOUNT ON Insert into DataImage (Image) values (null) RETURN @@IDENTITY END I want to use the return value off this SP. The following properties are set in SQL Task: SQLStatement: EXEC ?=dbo.sp_InsertDateImage ResultSet: Single Row ConnectionType: OLE DB Parameter Mapping: User::ImageKey, returnValue, long, @pKey Result set: @pKey, User::NewResultName I get the following error: [Execute SQL Task] Error: Executing the query "EXEC ?=dbo.sp_InsertDateImage" failed with the following error: "Invalid parameter number". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Does anybody know what the problem is. Tnx. |
#3
| |||
| |||
|
|
Hello Andre V., You are using SSIS? Have a look here http://wiki.sqlis.com/default.aspx/S...rOddities.html Allan Mitchell www.SQLDTS.com www.SQLIS.com www.Konesans.com Hello, I'm having some troubles using de Execute SQL Task. I have defined the following stored procedure: ALTER PROCEDURE dbo.sp_InsertDateImage AS BEGIN SET NOCOUNT ON Insert into DataImage (Image) values (null) RETURN @@IDENTITY END I want to use the return value off this SP. The following properties are set in SQL Task: SQLStatement: EXEC ?=dbo.sp_InsertDateImage ResultSet: Single Row ConnectionType: OLE DB Parameter Mapping: User::ImageKey, returnValue, long, @pKey Result set: @pKey, User::NewResultName I get the following error: [Execute SQL Task] Error: Executing the query "EXEC ?=dbo.sp_InsertDateImage" failed with the following error: "Invalid parameter number". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Does anybody know what the problem is. Tnx. |
![]() |
| Thread Tools | |
| Display Modes | |
| |