OnProgress Event

DTS Programming

DTS Programming

OnProgress Event

The OnProgress event provides information about the progress of a Data Transformation Services (DTS) task.

Applies To
Package Object Package2 Object
Syntax (Visual Basic)

Sub objPackage_OnProgress(ByVal EventSource As String, _
    ByVal ProgressDescription As String, ByVal PercentComplete As Long, _
    ByVal ProgressCountLow As Long, ByVal ProgressCountHigh As Long)

Part Description
objPackage Object variable of a type specified in the Applies To list.
EventSource Source of event being executed (for example, a step name).
ProgressDescription Description of task progress.
PercentComplete Percent of task completed.
ProgressCountLow Low 32 bits of units (for example, rows) completed.
ProgressCountHigh High 32 bits of units (for example, rows) completed.

Remarks

If the percent completed cannot be reported, 0 is returned.

For task types defined by DTS, the EventSource argument specifies a step name. Custom tasks choose what to return for EventSource. When an event is not caused by or associated with a step, the EventSource argument is empty.

If you need to raise this event from a custom task implemented in Microsoft® Visual Basic®, use this syntax:

pPackageEvents.OnProgress EventSource, ProgressDescription, _
    PercentComplete, ProgressCountLow, ProgressCountHigh

pPackageEvents is a reference to the package events object, passed in as a parameter of the custom task Execute method that you have implemented.

Prototype (C/C++)

HRESULT OnProgress(
    BSTR EventSource,
    BSTR ProgressDescription,
    long PercentComplete,
    long ProgressCountLow,
    long ProgressCountHigh);

See Also

Execute Method

Handling DTS Events and Errors