DtsConnection -- Consuming DTS DataReader In Code w/ Parameters

I am trying to pass a parameter into the DtsCommand object, but always get the error "a requested parameter does not exist in the package".  I have a variable defined at the top scope named EmailPromotion so I tried the following

command.Parameters.Add(new DtsDataParameter("User::EmailPromotion", 1));

and

command.Parameters.Add(new DtsDataParameter("EmailPromotion", 1));

no luck either way


Answer this question

DtsConnection -- Consuming DTS DataReader In Code w/ Parameters

  • Steven Don

    that fixed it.  much appreciated
  • KimballJohnson

    Does this exist for 2005   It looks like things are little different.
  • Paul Baudouin

    this is the method that reporting services uses to build reports on top of SSIS.  I cannot get this to show up in our VS.NET report designer.  I have posted in that forum with no responses.  Any help there would be greatly appreciated.

    I have already uncommented the SSIS data extension from the rsreportserver.config and restarted the service. 

    It shows up in web report manager, but not in vs.net

    Note using sept ctp and vs.net RC

  • jh55557777

    I believe you should also uncomment SSIS sections
    in RsReportDesigner.config.


  • June Low

    It seems for the variable to be configurable by DtsClient,
    it has to be in DtsClient namespace. Create a variable
    DtsClient::EmailPromotion, and use the short name
    "EmailPromotion" when constructing the parameter object.

    Hope this helps,
    Michael.

    P.S. Sorry, I could not find any documentation for this.
    I'll open a bug to get it documented.


  • Mukesh Joshi

    For those of you who are looking for the steps to change the variable namespace, follow these steps:

    1) In the SSIS package, open the variable window
    2) In the buttons at the top of the variables window, click the one farthest on the right (Choose Variable Columns)
    3) Click "Namespace" and press OK
    4) For the variable you are populating in code, change the namespace to DtsClient (this is case sensitive)
    5) Now, within any objects that utilize the variable, you'll have to change the variable reference (for example, change from User::VariableName to DtsClient::VariableName)
    6) In the code of the app consuming the SSIS package, the ParameterName you'll set won't include the DtsClient:: portion of the variable name

  • Meher123

    That was it. 

    Thx

  • Robert*

    The RSReportDesigner.config file is in
    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies



  • DtsConnection -- Consuming DTS DataReader In Code w/ Parameters