c# - How to add parameters to Oledb Source in ssis programmatically -
i creating ssis bundle contains ole db source.
the ole db source component execute sp is:
exec [dbo].[usp_getcustomeretlsourcedetailrecordset] @organizationname=?,@sourcerunid=? how create parameters using c# code pass above sp?
i tried this, , it's not working, how map "@organizationname" parameter project parameter?
guid variableguid = new guid(proj.parameters["organizationname"].id); guid sourcerunid = new guid(parent_etlsourcerunid.id); string parent_etlsourcerunid1 = @"""@organizationname"",{" + variableguid.tostring().toupper() + @"}" + ";" + @"""@sourcerunid"",{" + sourcerunid.tostring().toupper() + @"};"""; srcdesigntime.setcomponentproperty("parametermapping", parent_etlsourcerunid1);
this l did pass parameters stored procedure. dragged execute sql task designer pane, below sql query, l have used.
next step go 'parameter mapping' section of task. clicked on 'add' button, in variable column there pull downwards list, of available variables.
note variable value beingness passed stored proceedure direction 'input'.
these 2 articles should give more info mapping parameters , results sets passing parameters using script task
c# sql sql-server ssis
No comments:
Post a Comment