Execute Method

DTS Programming

DTS Programming
Syntax

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

Remarks

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.

Prototype (C/C++)

HRESULT Execute(
    IDispatch.*pPackage,
    IDispatch.*pPackageEvents,
    IDispatch.*pPackageLog,
    long.*pTaskResult);

See Also

DTSTaskExecResult

Execute (Package) Method