Using user input in an ActiveX task

  • 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.

  • 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

  • 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 2 (of 2 total)

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