Convert ActiveXScript task

  • Hi i have ActiveXScript task that is in old DTS

    it is not working with SSIS

    Can some body help to resolve

    '**********************************************************************

    ' Visual Basic ActiveX Script

    '************************************************************************

    Function Main()

    Dim oCmd, sSQL, oDom

    ''' If MSXML 4.0 is not installed this will not work!

    Set oDom = CreateObject("Microsoft.XMLDOM")

    Set oCmd = CreateObject("ADODB.Command")

    oCmd.ActiveConnection ="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks;Data Source=(local)"

    sSQL = "<?xml version=""1.0"" ?>"

    sSQL = sSQL & "<sql:query xmlns:sql=""urn:schemas-microsoft-com:xml-sql"">"

    sSQL = sSQL & "select employeeID as EMPID "

    sSQL = sSQL & " ,title as TITLE "

    sSQL = sSQL & "from HumanResources.Employee "

    sSQL = sSQL & "for xml auto,elements "

    sSQL = sSQL & "</sql:query>"

    oCmd.CommandText = sSQL

    oCmd.Dialect = "{5D531CB2-E6Ed-11D2-B252-00C04F681B71}"

    oCmd.Properties("Output Encoding") = "utf-8"

    oCmd.Properties("Output Stream") = oDom

    oCmd.Execute , , 1024

    oDom.Save "C:\Documents and Settings\shirish_jani\Desktop\XMLReport\New Folder\export.xml"

    Set oDom=Nothing

    Set oCmd=Nothing

    Main = DTSTaskExecResult_Success

    End Function

  • Did you try using the standard ActiveX Script Task? It is for executing older DTS scripts and this script looks like it should execute properly.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • so what is the changes that i need to apply with this

    once i take new activexscripttask from toolbox

  • shirishjani (9/21/2010)


    so what is the changes that i need to apply with this

    once i take new activexscripttask from toolbox

    I don't think you have to make any changes. It should work .

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • i got error Function not found

  • jani_shirish (9/21/2010)


    i got error Function not found

    You have to determine which function is not found. Start commenting code until you find which is the failing piece.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • still i am not able to resolve it

    do i need to use in script task

    or what are the changes i need to do

    please help me

  • jani_shirish (9/21/2010)


    still i am not able to resolve it

    do i need to use in script task

    or what are the changes i need to do

    please help me

    I have copy-and-pasted the code above in the ActiveX Script Task and it parsed correctly.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • but by running ssis it says function not found

  • jani_shirish (9/21/2010)


    but by running ssis it says function not found

    What is the exact error message?

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • TITLE: Package Validation Error

    ------------------------------

    Package Validation Error

    ------------------------------

    ADDITIONAL INFORMATION:

    Error at ActiveX Script Task [ActiveX Script Task]: Function not found.

    Error at ActiveX Script Task: There were errors during task validation.

    (Microsoft.DataTransformationServices.VsIntegration)

    ------------------------------

    ------------------------------

  • jani_shirish (9/21/2010)


    TITLE: Package Validation Error

    ------------------------------

    Package Validation Error

    ------------------------------

    ADDITIONAL INFORMATION:

    Error at ActiveX Script Task [ActiveX Script Task]: Function not found.

    Error at ActiveX Script Task: There were errors during task validation.

    (Microsoft.DataTransformationServices.VsIntegration)

    ------------------------------

    ------------------------------

    What did you specify for "EntryMethod" property ? Did you enter Main ?

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • TITLE: Package Validation Error

    ------------------------------

    Package Validation Error

    ------------------------------

    ADDITIONAL INFORMATION:

    Error at ActiveX Script Task [ActiveX Script Task]: Function not found.

    Error at ActiveX Script Task: There were errors during task validation.

    (Microsoft.DataTransformationServices.VsIntegration)

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

  • TITLE: Package Validation Error

    ------------------------------

    Package Validation Error

    ------------------------------

    ADDITIONAL INFORMATION:

    Error at ActiveX Script Task [ActiveX Script Task]: Function not found.

    Error at ActiveX Script Task: There were errors during task validation.

    (Microsoft.DataTransformationServices.VsIntegration)

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

  • TITLE: Package Validation Error

    ------------------------------

    Package Validation Error

    ADDITIONAL INFORMATION:

    Error at ActiveX Script Task [ActiveX Script Task]: Function not found.

    Error at ActiveX Script Task: There were errors during task validation.

    (Microsoft.DataTransformationServices.VsIntegration)

Viewing 15 posts - 1 through 15 (of 25 total)

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