![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Dear Custom DTS Task Writers: If you have written a Custom DTS Task in .Net, please attempt to modify your custom task within an ActiveX script. To do so, add your Custom DTS Task to a new package, add an ActiveX Script Task, and set its code to similar to below: Dim oPackage Dim oCustomTask set oPackage = DTSGlobalVariables.Parent set oCustomTask = oPackage.Tasks("[Get the Tasks name from disconnected view and paste here]").CustomTask oCustomTask.[CustomProperty] = "Hello World!" *OR* oCustomTask.[CustomMethod] Main = DTSTaskExecResult_Success The Property or Method must be one you have added other than the ones you are required to include.......other than Name and Description. If the script correctly runs, please may I have a copy of your code so I can figure out what I've done wrong in mine. Mine works for everything, except for accessing this way. Scott |
#3
| |||
| |||
|
|
Workaround is to use the properties collection, e.g. oCustomTask.Properties("MyProperty").Value = "Fred" -- Darren Green http://www.sqldts.com "Wm. Scott Miller" <Scott.Miller (AT) spam (DOT) killer.wvinsurance.gov> wrote in message news:uajBoGtuEHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Dear Custom DTS Task Writers: If you have written a Custom DTS Task in .Net, please attempt to modify your custom task within an ActiveX script. To do so, add your Custom DTS Task to a new package, add an ActiveX Script Task, and set its code to similar to below: Dim oPackage Dim oCustomTask set oPackage = DTSGlobalVariables.Parent set oCustomTask = oPackage.Tasks("[Get the Tasks name from disconnected view and paste here]").CustomTask oCustomTask.[CustomProperty] = "Hello World!" *OR* oCustomTask.[CustomMethod] Main = DTSTaskExecResult_Success The Property or Method must be one you have added other than the ones you are required to include.......other than Name and Description. If the script correctly runs, please may I have a copy of your code so I can figure out what I've done wrong in mine. Mine works for everything, except for accessing this way. Scott |
#4
| |||
| |||
|
|
Darren: Thanks for the reply! I cut and pasted your code into my routine and all I get is errors. Specifically, "Wrong number of arguments or invalid property assignment: 'oCustomTask.Properties'" Any ideas? Scott "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:%23zEjMV0uEHA.1616 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Workaround is to use the properties collection, e.g. oCustomTask.Properties("MyProperty").Value = "Fred" -- Darren Green http://www.sqldts.com "Wm. Scott Miller" <Scott.Miller (AT) spam (DOT) killer.wvinsurance.gov> wrote in message news:uajBoGtuEHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Dear Custom DTS Task Writers: If you have written a Custom DTS Task in .Net, please attempt to modify your custom task within an ActiveX script. To do so, add your Custom DTS Task to a new package, add an ActiveX Script Task, and set its code to similar to below: Dim oPackage Dim oCustomTask set oPackage = DTSGlobalVariables.Parent set oCustomTask = oPackage.Tasks("[Get the Tasks name from disconnected view and paste here]").CustomTask oCustomTask.[CustomProperty] = "Hello World!" *OR* oCustomTask.[CustomMethod] Main = DTSTaskExecResult_Success The Property or Method must be one you have added other than the ones you are required to include.......other than Name and Description. If the script correctly runs, please may I have a copy of your code so I can figure out what I've done wrong in mine. Mine works for everything, except for accessing this way. Scott |
![]() |
| Thread Tools | |
| Display Modes | |
| |