Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dts- Global Global Variable

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Hi,

I have a Dts that runs everyday generating a text file. I rename the file in the DTS with an activeX Script but I would like to rename it according to a "count" number such as: file_1, file_2, file_3. But if I use a Dts global variable it doesn't work: the variable is global in a Dts run but it takes back the init value the next time. Is there a way to have a GLOBAL global variable that would be common to the different runs of a DTS.

Thanks

Vincent
 
Hi there,
It is not possible to store a value in the memory variable for different DTS runs. But you can always store the required value in a table. And then can select/update the required value from there.
 
Be aware that IF you use this approach it IS NECESSARY for each access to the table to have EXCLUSIVE access to the table during the update process.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Hi MichaelRed,
I don't think there should be any problem of exclusive use.
Because as i understand the problem, The DTS is the only process by which we are doing select/update in this table.
And moreover the requirement is not to run different instances of DTS at same time but is the multiple instances one after another.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top