Set step precedence with activex

  • I have a DTS package that imports several different files into a table and then runs some updates on the data.  The some or all of the files may or may not be there.  I have an activex script that disables the data import task for each individual file if it is not there but I need the updates to run after all of the available files are imported.  Right now the precedence for the update is that all of the imports are completed.  Is there a way to set the precedence so the update only depends on the imports that were enabled by the activex script?  I can't seem to find the syntax for this anywhere.


  • Try this.  http://msdn2.microsoft.com/en-us/library/aa933534(sql.80).aspx

    Regards,
    Matt

  • Thanks, I found that in my searching but it only goes over enable and disableing and executing.  I needed to set precedence based on which files imports are goin to run.  I finally found the syntax and created this sub for anyone else interested.

     

    sub setprec(dest,src)

    Set oPkg = DTSGlobalVariables.Parent

    Set Destination = oPkg.Steps (cstr(dest))

    Set Source = oPkg.Steps (cstr(src))

    Set Prec = Destination.PrecedenceConstraints.New(Source.name)

    Prec.PrecedenceBasis = DTSStepPrecedenceBasis_ExecResult

    Prec.value = DTSStepExecResult_Success

    Destination.PrecedenceConstraints.Add Prec

    Destination.DisableStep = False

    end sub


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

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