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

OLE DB Command and optional parameters for a stored procedure

$
0
0

I'm building an SSIS Package with BIDS 2008R2.  The database that I wish to execute the SP on is SQL Server 2005 with SP4 4.

I have a procedure similar to this:

CREATE PROCEDURE test_insert  
(
@parm1 int 
,@parm2 varchar(50) = NULL 
,@parm3 varchar(50) = NULL 
,@parm4 datetime = NULL 
,@parm5 datetime 
,@parm6 int
)
AS ...


In the Component Properties of the OLE DB Command, I specified the SqlCommand as:

EXEC dbo.test_insert @parm1 = ?, @parm5 = ?, @parm6 = ?

Hit Refresh, and got no errors.

However, when I go to Column Mappings, in the destination columns, I see 3 columns listed.  But they are not the 3 specified (@parm1, @parm5 and @parm6)  Instead, they are the first 3 parameters to the stored procedure @parm1, @parm2, and @parm3.  

All the parameters that were skipped do have a default of NULL assigned.

I'm not sure why I'm not getting the correct list of parameters when mapping.  

Any help greatly 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>