6

I am new to this network. Hoping I'll find an answer to this problem.

I have a SSIS Project with multiple Packages which are using the Project Parameters. I am trying to update the Project Parameters e.g. @PeriodStart: 2014-05-31. I can't find a way to dynamically write to the Project Parameter.

I am using Visual Studio 2010 in 4.0 Framework. Please can anyone shed light on this ?!

Kind Regards Bal

Bal
  • 81
  • 1
  • 1
  • 6
  • Can you provide some code showing what you have tried so far? – Justin E Jul 31 '14 at 14:52
  • I have tried in the Project.Params area found in the Solution Explorer to use the Parameters but didn't work out unless there is something I'm doing wrong. I have also come across catalog.set_object_parameter_value but not sure what the correct syntax is to use this. – Bal Jul 31 '14 at 15:03
  • I believe catalog.set_object_parameter_value is used in SQL however – Bal Jul 31 '14 at 15:10
  • *How* are you calling your packages? Are you trying to do this all within the .NET object model? Are you deploying to SQL Server, assuming Project deployment model? We need more information – billinkc Jul 31 '14 at 21:48

1 Answers1

6

Project parameters are read only. What you are after is to assign variables depending on the project parameters and then read the variables. An overview of variables and parameters is here:

http://social.technet.microsoft.com/wiki/contents/articles/22194.use-ssis-variables-and-parameters-in-a-script-task.aspx

For example, you could add a script task to the control flow and then read in the project parameters, assign a readwrite variable to the script task and then use this variable.

Robert Anderson
  • 1,246
  • 8
  • 11
  • @billnkc I am doing this using a Script Task. In summary I am trying to change the Project Parameters at runtime i.e. change "@PeriodEnd" to the last working day. This will feed into all my Packages to run for the correct date. – Bal Aug 01 '14 at 07:13
  • If the Project.Params are read only then that has answered my question unless there is a way around it ? – Bal Aug 01 '14 at 07:14
  • I have tried this already: string MyPeriodEnd = "2014-07-31"; Dts.Variables["Project::PeriodEnd"].Value = MyPeriodEnd; This obviously fails as you cannot add the Prject.Params in the ReadWriteVariables found in the Script Task Editor. – Bal Aug 01 '14 at 07:39