The Execute method executes a Data Transformation Services (DTS) task object.
object.Execute pPackage, pPackageEvents, pPackageLog, pTaskResult
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
pPackage | Reference to the Package2 object |
pPackageEvents | Reference to the events of the Package2 object |
pPackageLog | Reference to a PackageLog object |
pTaskResult | Return code from the DTSTaskExecResult constants |
An application does not have to call the Execute method for each step or task. Instead the Package2 object calls the Execute method to launch each step or task after the application calls Package2.Execute.
A reference to the Package2 object is passed as a parameter to allow access to the objects in the hierarchy for the package. But pPackage and all objects in its hierarchy must not be saved or referenced after the Execute method returns. Check pPackageEvents and pPackageLog for NULL/Nothing before using them.
HRESULT Execute(
IDispatch.*pPackage,
IDispatch.*pPackageEvents,
IDispatch.*pPackageLog,
long.*pTaskResult);