Package Parameters Issue

  • Hi

    I have started giving Project parameters a try in SSIS 2012 in order to pass through values from a parent package to its child. The value that I need to pass across is an Audit ID which gets generated in a SQL task. The problem I am having is assigning the value to the package parameter as I am getting the following error:

    Validation error. SQL Begin Audit SQL Task: Variable "$Package::AuditLogID" cannot be used as an out parameter or return value in a parameter binding because it is read-only.

    From the error I’m taking a guess that the error is happening due to the parameter being set to read-only. I’ve had a look through the properties for the parameter to see if it is possible to change this but have had no luck.

    Anyone have an ideas on what can be done? This was fairly a simple task prior to 2012 using the package configuration manager, so I am thinking of converting the project to the Package Deployment model in order to get this feature back.

    Thanks

  • Package parameters are read-only. (makes sense, really, you can't 'pass them back' to the caller -- there's no mechanism for that). What you can do is define a variable that uses the package parameter and modify the variable.

    Gerald Britton, Pluralsight courses

  • Thanks, will give it a go.

  • All sorted.

    Assigned the value to a variable and passed this value to the child's package parameter via the Parameter bindings section of the Execute Package Task Editor.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply