SQL 2000 DTS question

  • I have a DTS containg the following:

    1.Execute SQLL task.

    2. Text file source

    3. transform datatask.

    4. vb script to Import file

    5. vb script

    6. txt file source

    7.Import data

    I want the txt file source be dynamic (the path and file name be used)

    Also the vb script that import the file (vb script to Import file)

    how to do that using SQL 2000 and SQL command

    Best regards

  • I have done this before, many years ago.

    I used Global variables to specify the path.

    I would read the files in the directory and assign the most recent file by using the FSO to get the Date modified date of the file and store the file name in an ActiveX Script.

    I also had code to rename and archive the file as well as a section of code that would delete the files and eventually purge old files from the archive directory.

    Then I would set the connect dynamically.

    I lost my code but there are examples in the Database Journal Web Site and various other sites on how to do this.

    I would perform som queries on Setting a connection dynamically.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Have you checked this out:

    Using Global Variables with DTS Packages

    Joie Andrew
    "Since 1982"

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

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