Global variable doesn't retain value -
07-13-2003
, 03:45 PM
Hi,
I have global variable which I change within one of the
DTS package tasks (Active X). I want to store date and
time of package execution in this global variable, so I
can use it for next execution.
The problem is that global variable doesn't remember new
date/time, assigned within Active X task, but after
execution keeps always the same value, defined during
designing phase of the package (DTS designer).
Within the package, everything works fine, which means
that all other tasks use correct value of the Global
Variable, assigned in Active X task (see below)...
Here is the active x code which I use, for global
variable change:
Function Main()
DTSGlobalVariables("BeginDateTime").Value = CStr
(Now)
if Err <>0 then
Main = DTSTaskExecResult_Failure
else
Main = DTSTaskExecResult_Success
end if
End Function
Thanks in advance,
Ed |