Why is this so hard?

  • Why is it so easy to retrieve info from an Input Global Variable:

    DTSDestination("InfoID")=DTSGlobalVariables("InfoID").Value

    but yet impossible to set, and have an Output Global Variable retain it's value?:

    DTSGlobalVariables("strRetFileString").Value="xxxxxxxxxxx"

    I am loosing hair over this

  • This was removed by the editor as SPAM

  • This is what I do to set it:

    exec @errorcode=sp_OASetProperty @pkgID, 'GlobalVariables ("gvImportJobID").Value', 'xxxxxxxx'

    --Obtains OLE Automation error information

    exec sp_OAGetErrorInfo @pkgID,

    @STR OUT,

    @description OUT

    if @errorcode <> 0 GOTO Exit_status

  • Thanks Sal,

    I have done further testing on this and found:

    I have a Stored proc triggering a DTS package, the package transforms a file to table, using an active x script. The package takes in a few global variables and incorps them into dts.

    I would also like the active x script to SET a global variable that I can then be picked up from the calling stored proc. No problems with the sql code in the stored proc catching the output global variable.

    The problem seems to be that the active x script is not properly setting the value for the output global variable.

    ++++++++++++++++++++++++++++++++++++++++++

    DTS Global Variable Default Value

    strRetFileString "AAAAAAAAA"

    {Created in Package properties}

    ++++++++++++++++++++++++++++++++++++++++++

    I have done further testing and found:

    +Stored proc will receive the default value "AAAAAAAAA")

    -Stored Proc will NOT receive the updated value DTSGlobalVariables("strRetFileString").Value="xxxxxxxxxxx" set inside the active x script

    I have seem other posts similar to this problem but yet to find a concrete answer if this is a bug or even if this is possible to do with ouput global Variables.

    Any insight greatly appreciated.

    Machine is 2k advanced server with sql 2k all latest patches.

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

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