Script Prompt to Select Path Connection String for Variable

  • Is there a script that brings up a prompt that allows user to navigate/select path of flat file connection string and assign it variable to be used in Data Flow task?

  • joeshu26 (1/8/2016)


    Is there a script that brings up a prompt that allows user to navigate/select path of flat file connection string and assign it variable to be used in Data Flow task?

    Not directly. SSIS runs on a server and is not intended to be an interactive tool. However, an indirect solution might be OK.

    - Client application prompts user

    - User selects path

    - Path gets written to database by client app

    - SSIS package gets initiated

    - SSIS package picks up path from database

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • you can...

    what version of SQL are you using ? Is the user running the SSIS package in Visual Studio or executing the package in SSMS ?

  • simon-hulse (1/8/2016)


    you can...

    what version of SQL are you using ? Is the user running the SSIS package in Visual Studio or executing the package in SSMS ?

    But you shouldn't. Unless the user is a developer and this is for debugging purposes.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • his user may be a developer...

  • Yes, user would be executing from SSIS, or executing package from Window Explorer.

  • Using SQL Server 2012, Visual Studio 2010 shell

  • You may want to point the developer here.

    A script task would be used to call this.

    The script task would need to assign the returned path to an SSIS variable, which would be picked up by the data flow.

    I reiterate. This is a developer-only technique.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • +1 (well, really +1000) on Phils comments. this is very poor form, like when you used to use modal dialogs in VB6, or flashing & scrolling text in the browser status bar... :-D:hehe:

    Steve.

  • stevefromOZ (1/8/2016)


    +1 (well, really +1000) on Phils comments. this is very poor form, like when you used to use modal dialogs in VB6, or flashing & scrolling text in the browser status bar... :-D:hehe:

    Just because something can be done if you try hard enough, it doesn't mean it should be done.

    If someone needs a user to select a file to be processed by SSIS, then it would be better to have a non-SSIS application that would perform the first part and then execute the SSIS package, passing the file path to SSIS as a parameter.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 10 posts - 1 through 9 (of 9 total)

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