Script component with package variables

  • Hi all,

    i can t store values in package variable in Script component.

    i implement the following

    i have a flat file source and i use multi task component,

    i split the data by Derived Column then i use use script component

    in that i m calling stored procedure, it will check data is exists in Database

    then return primary key as output parameter .

    but i cant assign this value to the package level variable ?

    i got error :The collection of variables locked for read and write access is not available outside of PostExecute.

    then i used the PostExecute() method , even i got the ssame error

    how to resolve that ?

    Public Overrides Sub PostExecute()

    MyBase.PostExecute()

    Me.Variables.ClaimId = CType(sqlParamClaimID.Value, Int32)

    Me.Variables.MemberId = CType(sqlParamMemberID.Value, Int32)

    Me.Variables.ProviderId = CType(sqlParamProviderId.Value, Int32)

    End Sub

  • You need to remove the variables from the ReadWrite variables list and use the Variable Dispenser to unlock the variable for write within the script component.

    Check out this link.

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

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