CustomTask Property
The CustomTask property returns a reference to the class-specific task object.
object.CustomTask [= value]
Part |
Description |
object |
Expression that evaluates to a Task object |
value |
Returns a reference to the class-specific task object |
Data Type
Depends on the Data Transformation Services (DTS) task class being used.
Modifiable
Read-only
Prototype (C/C++)
HRESULT GetCustomTask(IDTSCustomTask **pRetVal);
Remarks
The New method of the Tasks collection creates a (generic) Task object and a class-specific task object.
Example
The relationship between the (generic) Task object, the class-specific task object and the Step2 object is illustrated by the following Microsoft® Visual Basic® code:
Dim objPackage As DTS.Package2
Dim objTask As DTS.Task 'This is the generic Task object.
Dim objStep As DTS.Step2
Dim objDataPump As DTS.DataPumpTask2 'This is the class-specific task.
. . .
Set objStep = objPackage.Steps.New
objStep.Name = "LowerCaseStep"
Set objTask = oPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "LowerCaseTask"
objStep.TaskName = objDataPump.Name
objPackage.Steps.Add oStep
objPackage.Tasks.Add objTask
See Also
New (ID) Method
Step2 Object
Tasks Collection