dts global variables not persistent

  • Hi All

    I have a problem and am hoping someone can help. I have a dts package that copies a file from a remote dir to the local server, processes the contents and then deletes the local copy of the file. This happens based on certain external events. I want to make sure that I dont process the same file twice so I set up a global variable which stores the name of the last file processed. This works fine if I manually run the package and choose save when exiting. However when the package is run via a schedule or called from a stored procedure the global variable holding the name of the last file processed does not get updated. I have searched for info on how/if one can make global variables act in the way I want but to no avail.

    Any help greatly appreciated.

    Paul

  • your global variable will 'always' be initilised to the value that you last saved your package.

    You may want to save the value into tmp table/file and upload to global vairable everytime you start and end your package.

     

     

  • create a temp table and then use the value in that table as your global variable. This way it is always updated and is using the most currec name.

  • Hi All

    Thanks for the replies. I was hoping I would not have to resort to creating a temp table but it looks like I will have to!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply