![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi RMoore, I understand that you would like to convert some of your existing ActiveX script to use Foreach/For Loop Container and dynamically create a new globar variable for each column of your sproc query result and save the value assinged as type String in your SSIS package. If I have misunderstood, please let me know. I think that For Loop Container may be more appropriate for your scenario, however from my research, Variables seemed not be able to be created within an existing package at runtime. I will further consult the product team on this issue. Now could you please let us know why you would like to do in this way? I think that a better way is that you use your ActiveX Script in a C# or VB application, and after you get the query result, you can have your application dynamically create a new package and use Package.Variables.Add to add variables for it. You may refer to: Variables.Add Method http://msdn2.microsoft.com/de-de/lib...ts.runtime.var iables.add.aspx For Loop Container http://technet.microsoft.com/en-us/l.../ms139956.aspx If you have any questions or concerns, please feel free to let me know. Best regards, Charles Wang Microsoft Online Community Support ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ================================================== ==== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ==== |
#4
| |||
| |||
|
|
Charles, We are starting to migrate some of our DTS packages to SSIS and we should not have to completly redo them due to limitations in SSIS. For speed of development, we have developed package templates that we use at the start of every new project. For ease of maintenance and inventory, we maintain all of our global variables in a table. This is why we do not hard code package variables. We also need the variables to be static at run time so I would appreciate it if you would follow-up on this item. We frequently need to post process packages which will be easier for us to do with our variables being stored/pulled from a table since SSIS packages are installed. Thanks for the link to the Variables.Add Method. Currently I have modified my sproc to return the data as rows instead of columns. I have created a SQL task to store that resultset. I have created a For Each Loop with a VBscript task that displays the variable name and value to the screen via MSGBox. I am working on changing the MSgBox to use the variables.add method you mentioned. -- RMoore "Charles Wang[MSFT]" wrote: Hi RMoore, I understand that you would like to convert some of your existing ActiveX script to use Foreach/For Loop Container and dynamically create a new globar variable for each column of your sproc query result and save the value assinged as type String in your SSIS package. If I have misunderstood, please let me know. I think that For Loop Container may be more appropriate for your scenario, however from my research, Variables seemed not be able to be created within an existing package at runtime. I will further consult the product team on this issue. Now could you please let us know why you would like to do in this way? I think that a better way is that you use your ActiveX Script in a C# or VB application, and after you get the query result, you can have your application dynamically create a new package and use Package.Variables.Add to add variables for it. You may refer to: Variables.Add Method http://msdn2.microsoft.com/de-de/lib...erver.dts.runt... iables.add.aspx For Loop Container http://technet.microsoft.com/en-us/l.../ms139956.aspx If you have any questions or concerns, please feel free to let me know. Best regards, Charles Wang Microsoft Online Community Support ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ================================================== ==== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ====- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Hi Rmoore, I have not got the response from the product team. I will try following up them. Meanwhile, could you please let me know if the suggestions of writing an application to dynamically create packages are helpful for you? If you have any questioins or concerns, please feel free to let me know. Best regards, Charles Wang Microsoft Online Community Support ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ================================================== ==== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ==== |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
Hi RMoore, Thanks for your feedback. The problem is that Variables could not be added into a package which is in runtime. My original suggestion was that you may consider writing a .NET application for dynamically creating a package with static variables. I think that for this specific issue, you can take advantage of LOOP tasks in SSIS, however for dynamically creating variables into a running package, though I am trying to consult the product team to confirm if this issue can be implemented, from my current research from our internal databases, it is most likely not supported by SSIS currently. Actually SSIS also supports ActiveX Script Task which should be the easiest way for such complex scenario. Could you please also consider this method? Also, since the consulting process may need a long time, could you please just send me (changliw_at_microsoft_dot_com) an email response so that I can timely update you when I get their response? If you have any questions or concerns, please feel free to let me know. I am very glad to work with you for further assistance. Best regards, Charles Wang Microsoft Online Community Support ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ================================================== ==== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ==== |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |