Using user input in an ActiveX task

  • slider

    SSC Journeyman

    Points: 84

    For a package that is only ever going to be run manually is there any way for me to pop up a box allowing user input and then use that value inside the script?

    TIA.

  • Greg Charles

    SSC-Forever

    Points: 45403

    Try this example from SQLDTS.com:

    http://www.sqldts.com/default.aspx?218

    It has a downloadable package template that you can change to suit your needs.

    Greg

    Greg

  • bellis

    SSCarpal Tunnel

    Points: 4667

    You can do this in an ActiveX Script like below...

    Function Main()

         Dim myYearQtr

         myYearQtr = InputBox ("Enter the date you would like to extract data for.", "Extract Data","4Q2003")

         DTSGlobalVariables("myYearQtr").Value = myYearQtr

         Main = DTSTaskExecResult_Success

    End Function

    You can then use the global variable that is set anywhere in the DTS.

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

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