Results 1 to 2 of 2

Thread: Passing parameter to stored procedure in DTS

  1. #1
    Zombie Guest

    Passing parameter to stored procedure in DTS


    When executing a stored procedure inside a DTS package, Is it possible for me to assign the input parameters dynamically from the Global variables?

    The above scenario in SQL 7.0

    Thanx

  2. #2
    Ananth Guest

    Passing parameter to stored procedure in DTS (reply)

    I have not been able to find a direct method to do this. What I do is, create an ActiveX task before the execute sql task, which will build a new SQL string and update the task's query. Here's a sample code :


    '********************************************* *************************
    ' Visual Basic ActiveX Script
    '********************************************* ***************************

    Function Main()
    dim pkg
    DTSGlobalVariables("UID&#34 = "sa"
    set pkg = DTSGlobalVariables.Parent

    pkg.Tasks(1).Properties("SQLStatement&#34.value = "exec sp_who2 '" & DTSGlobalVariables("UID&#34 & "'"
    Main = DTSTaskExecResult_Success
    End Function



    ------------
    Zombie at 5/11/01 11:57:24 AM


    When executing a stored procedure inside a DTS package, Is it possible for me to assign the input parameters dynamically from the Global variables?

    The above scenario in SQL 7.0

    Thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •