Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS variable persistence.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-13 : 01:49:42
Ty writes "I have written code in a DTS package that creates a text file for a partner company to download as an end-of-day process.

Part of the solution is creating a dynamic file name that has a format of:

YYYYMMDD_xxxxx.txt

The xxxxx is a five-digit index that counts up from 1 and is independent of the date component of the name.

My problem is that while the DTS package design environment is open, the naming works correctly, updating the Text File (Destination) filename field properly with every execution of the package. When closed, running the package as a scheduled event, the filename property persists as the last filename that was updated while the design environment was open.

The result is that, on the same day, the file generation overwrites the last file and on subsequent days a new file is generated, but also retains the last file name in the property.

I know that I could create a small table to log and count the process while generating the filename, but I don't have that flexibility owing to the fact that I don't have ownership of the database in question.

My question is this: Is there a way to update the package's destination file name property when the package isn't open in the design environment?

Thank you very much.

Ty"
   

- Advertisement -