February 10, 2009 at 4:26 pm
i'v added a Global Variable to the DTS Package..
in a ActiveX Script i have this:
DTSGlobalVariables("counter").value = DTSGlobalVariables("counter").value + 1
this works fine when i hit execute in the DTS .. but when i run the job in: Local Packages or SQL Server Agent/Jobs .. the Variable counter will stick the the same number..
strange .. when i close the DTS .. and hit Execute package .. the counter is raised .. but the second time the numbers keeps the same ..
February 10, 2009 at 10:12 pm
Do you mean execute the package twice? The variables don't maintain from execution to execution.
February 11, 2009 at 3:49 am
yes .... i want to run a package every day .. that packages uses a Global Variables. Every time the packages runs .. the packages needs a +1 on the Global Variables each time the packages runs .. like a counter ..
February 11, 2009 at 4:00 am
Hi,
Maybe you can check this approach.
Have a sql table where you can store the last value and get the value from there using a dynamic properties task or from withing the activex script task and assign it to the global variable.
Regards,
Srira
Sriram
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply