Dynamic File Names in Excel Conections

  • I have an interesting situation whereas I'm trying to upload a new Excel spreadsheet via DTS into a SQL2000 database. Is there a way to dynamically specify the Excel file for the DTS package, or am I stuck using a specified connection?

    -------------------------

    "Computer games don't affect kids; I mean if Pac-Man affected us as kids,

    we'd all be running around in darkened rooms, munching magic pills and

    listening to repetitive electronic music."


    -------------------------
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids,
    we'd all be running around in darkened rooms, munching magic pills and
    listening to repetitive electronic music."

  • First, will the structure of the data be the same, no column changes? If so then there have been several ways proposed in other threads. If the name is unknown (or even known) but the folder will be the same then consider using Active Scripting so you can use FileSystemObjects to scan for the name and the open the file and pull the data in.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • You'll have to forgive my ignorance, but would that be, in effect, creating a dynamic connection object? Can you point me to some tutorials on Active Scripting. I am a ColdFusion developer and have not had much experience with VBScript.

    -------------------------

    "Computer games don't affect kids; I mean if Pac-Man affected us as kids,

    we'd all be running around in darkened rooms, munching magic pills and

    listening to repetitive electronic music."


    -------------------------
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids,
    we'd all be running around in darkened rooms, munching magic pills and
    listening to repetitive electronic music."

  • You can add a dynamic properties task to your package, click add, then source your connection from an ini file or global variable (plus other options).

    Regards,

    Andy Jones

    andyj93@hotmail.com

    Edited by - andyj93 on 06/20/2002 09:46:11 AM

    .

  • Thanks a bunch. Wow!! That's exactly what I needed.

    -------------------------

    "Computer games don't affect kids; I mean if Pac-Man affected us as kids,

    we'd all be running around in darkened rooms, munching magic pills and

    listening to repetitive electronic music."


    -------------------------
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids,
    we'd all be running around in darkened rooms, munching magic pills and
    listening to repetitive electronic music."

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

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