Old ladyHow Big Is Your Package?
Size up and convert your DTS package to SSIS. If you have the biggest DTS package, win a gift card and certificate of a world record package size.  
Rewrite ActiveX code that accesses DTS Object Model - Pragmatic Works
in

Pragmatic Works

Rewrite ActiveX code that accesses DTS Object Model

Last post 11-15-2007 5:43 PM by Brian Knight. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-15-2007 12:19 PM

    Rewrite ActiveX code that accesses DTS Object Model

    Will DTS xChange handle this?   It's basic, yet our application has 00's of similar scripts.  As a result, the wizard is rejecting all of our packages.

    Function Main()

    Dim pkg
    set pkg = DTSGlobalvariables.Parent

    Dim stpQuery, stpNext, stpFailed
    set stpQuery = pkg.Steps("Query")
    set stpNext = pkg.Steps("GetRecordCount")
    set stpFailed = pkg.Steps("FAILED_1")

    If stpQuery.executionResult = 0 Then
     'MsgBox "Query was successful"
     stpNext.DisableStep = False
     stpFailed.DisableStep = True
    Else
     'MsgBox "Query Failed"
     stpNext.DisableStep = True
     stpFailed.DisableStep = False


    End If

     Main = DTSTaskExecResult_Success

    End Function

  • 11-15-2007 5:43 PM In reply to

    Re: Rewrite ActiveX code that accesses DTS Object Model

    Hi,  thanks for posting this common question about ActiveX. We do convert ActiveX to SSIS but DTS xChange converts it to a similar ActiveX Script Task inside of SSIS with your exact code above. That being said, this code, which uses the DTS object model won't work in SSIS. All other tasks will convert though to their SSIS equivalent. We have about 90% success rate with package migrations overall.

    In addition, you may find this blog post useful about migrating these types of tasks: http://pragmaticworks.com/community/blogs/dtsxchange/archive/2007/09/08/Converting-the-ActiveX-Script-Task.aspx
     

    With the code above, you'd probably want to convert it using DTS xChange and then re-engineer this one piece of the package by using conditional expressions on the precedence constraints. If you need any ideas once you convert, just send us an email and we'll be happy to help.

    Brian 

    Filed under:
Page 1 of 1 (2 items)
Copyright Pragmatic Works
Powered by Community Server (Non-Commercial Edition), by Telligent Systems