DTS package modification

  • hi everyone

    when i modify the DTS package by adding fields to source and destination tables, the package fails on execution. i think there is a counter problem with the ActiveX script but i dont know how to fix it. can any one please help.

    Thank you

  • Did you open the transformation object and update the mappings?

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • [thank you for replying. but yes i did check all the transformations and tested the DTS package and it doesnt give me an error but, still it does not transfer any records 🙁

    hi everyone

    when i modify the DTS package by adding fields to source and destination tables, the package fails on execution. i think there is a counter problem with the ActiveX script but i dont know how to fix it. can any one please help.

    Thank you

    [/quote]

  • Please post your script (alter any sensistive data) so we can look and maybe someone will catch an error.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • What are you actually mofifying ?

    Do you physically add more fileds to the tables referenced as source and/or destination?

    or may be you modify the the transform object with adding more fields to the source or destination?

    What kind of task are you having problem with?

    Tom

  • '**********************************************************************

    ' Visual Basic Transformation Script

    ' Copy each source column to the

    ' destination column

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

    Function Main()

    on error resume next

    dim line1

    dim readcounter

    readcounter=0

    DTSDestination("custno") = DTSGlobalVariables("cid").Value

    DTSDestination("club") = DTSSource("club")

    DTSDestination("mail") = DTSSource("mail")

    DTSDestination("fname") = DTSSource("fname")

    DTSDestination("lname") = DTSSource("lname")

    DTSDestination("address1") = DTSSource("address1")

    DTSDestination("address2") = DTSSource("address2")

    DTSDestination("city") = DTSSource("city")

    DTSGlobalVariables("cid").Value=DTSGlobalVariables("cid").Value+1

    Dim fso

    Dim a,a2

    'Open the text file.

    Set fso = CreateObject("Scripting.FileSystemObject")

    Set a = fso.GetFile("C:\WCDInputData.csv")

    Set a4 = a.OpenAstextStream(1)

    Set fso1 = CreateObject("Scripting.FileSystemObject")

    Set a2 = fso1.GetFile("C:\WCDCSVSuccessLog.txt")

    Set a3 = a2.OpenAstextStream(8)

    Set fso3 = CreateObject("Scripting.FileSystemObject")

    Set a5 = fso3.GetFile("C:\WCDCSVFailureLog.txt")

    Set a6 = a5.OpenAstextStream(8)

    'Read line from the file to the global variable.

    dim x1

    x1=DTSGlobalVariables("cc").Value

    x1=x1+1

    DTSGlobalVariables("cc").Value=x1

    Do Until readcounter=DTSGlobalVariables("cc").Value

    line1 = a4.ReadLine

    readcounter=readcounter+1

    Loop

    If(err.Number<> 0) then

    Main = DTSTransformStat_SkipInsert

    DTSGlobalVariables("cid").Value=DTSGlobalVariables("cid").Value-1

    a6.WriteLine line1

    err.clear

    else

    Main = DTSTransformStat_OK

    a3.WriteLine line1

    end if

    End Function

    {when i physically add columns to the tables in the database and in the DTS pakcage it fails to execute:( }

  • i have posted the ActiveX script for the DTS package i hope you can solve it.

    Thanks

  • Sorry, I will get to this tonight, my wife stole my keyboard so I was without yesturday.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • GO to looking and noticed you used

    quote:


    on error resume next


    Take it out and run, this should give you a better idea which line is failing, with it in it will continue until you get to the error checking you created but a lot happens in between. Also the files you are trying to open for working with do exist at those locations, make sure as this could be where your error beign.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • quote:


    [thank you for replying. but yes i did check all the transformations and tested the DTS package and it doesnt give me an error but, still it does not transfer any records 🙁

    hi everyone

    when i modify the DTS package by adding fields to source and destination tables, the package fails on execution. i think there is a counter problem with the ActiveX script but i dont know how to fix it. can any one please help.

    Thank you


    [/quote]

Viewing 10 posts - 1 through 9 (of 9 total)

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