Re: DTS SQL 2000 Global Variable initialization problem - please h
- From: jason.essebag@xxxxxxxxx
- Date: Tue, 16 Oct 2007 13:19:57 -0000
On Oct 15, 9:00 pm, Todd Beaulieu
<ToddBeaul...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
What I was trying to say is that globals to persist. That's how they work.
Many people put "settings" in them at design time that control execution.
It's by design.
Furthermore, when I suggested putting an "init" script in the package to set
them, and that you'd "clear some" and "set some", I meant entirely at YOUR
decision, you'd either "clear" some or "set" some, oftentimes through a
config file.
If you don't want avariableto persist, the solution is remarkably
simple... clear it in the "init" script!
"jason.esse...@xxxxxxxxx" wrote:
On Oct 11, 9:21 am, Todd Beaulieu
<ToddBeaul...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Can't you just add an "init" script as the entry point and have it clear
out/set any globals to what you want them to be for the run? I'd say you
should do this as a matter on convention in every package. Some variables
will be cleared, others will be set from config files, database lookups, etc.
"jason.esse...@xxxxxxxxx" wrote:
Hi, I have an issue with myDTSand I need somehelp.
Myglobalvariables seem to keep the same value since the last
execution.
This is aproblemfor me because I need to rename a part of the file,
so the part that is not changed from the original still remains in the
new name.
Example
FILEABC_12345 gets processed through myDTSas PROCESSED_12345. If I
place a new file in the directory called FILEABC_6789 then my
processed file for that one now becomes PROCESSED_12345 since the
globalvariablekept that value of the original example.
How can I resetGlobalVariables every run? I am using
DTSGlobalVariables.Parent
Help!
jason.esse...@xxxxxxxxxx Hide quoted text -
- Show quoted text -
Hi Todd,
I have an activeX script that sets it to empty string, and have it as
output in a msgbox to ensure it's the case before and after its use.
For some reason theglobalvariableis persistent. I'd like to save
config files as a last resort, I am surprisedDTSis designed to
behave this way.
Some variables will be cleared
Which variables will be cleared?- Hide quoted text -
- Show quoted text -
Makes sense. Here is my init script:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim oGlobalVariables
Dim oVariable
For Each oVariable in DTSGlobalVariables
if(oVariable = "gv_FullFileName") then oVariable.Value = ""
Next
Main = DTSTaskExecResult_Success
End Function
Yet the variables still persist.
Do you have an example of an init script I can use for initializing
gv_FullFileName ?
.
- References:
- DTS SQL 2000 Global Variable initialization problem - please help
- From: jason . essebag
- Re: DTS SQL 2000 Global Variable initialization problem - please help
- From: jason . essebag
- Re: DTS SQL 2000 Global Variable initialization problem - please h
- From: Todd Beaulieu
- DTS SQL 2000 Global Variable initialization problem - please help
- Prev by Date: Re: Running two Steps at the same time
- Next by Date: Check file existence and date time of the file - VBscript
- Previous by thread: Re: DTS SQL 2000 Global Variable initialization problem - please h
- Next by thread: How to change the owner of the source/destination tables within a preexisting DTS package
- Index(es):
Relevant Pages
|