I have 2 DTS global variables. POStart and POEnd. At the beginning of my DTS package, POStart is assigned the following value through an activeX script:
DTSGlobalVariables("POStart").Value = DateDiff("n", Now, DTSGlobalVariables("POEnd").Value)
POEnd is assigned a value at the end of the DTS package, through another ActiveX script:
DTSGlobalVariables("POEnd").Value = Now()
Essentially, POStart is used to determine when the last time the package was successfuly run.
My problem is that when run as a SQL Agent job, the POEnd variable is not being passed on, job to job. It is holding the value that is stored when I last manually ran the DTS package in design mode.
Any ideas guys?