다음을 통해 공유


Raising Events in the Script Component

Events provide a way to report errors, warnings, and other information, such as task progress or status, to the containing package. The package provides event handlers for managing event notifications. The Script component can raise events by calling methods on the ComponentMetaData property of the ScriptMain class. For more information about how Integration Services packages handle events, see Integration Services 이벤트 처리기.

Events can be logged to any log provider that is enabled in the package. Log providers store information about events in a data store. The Script component can also use the Log method to log information to a log provider without raising an event. For more information about how to use the Log method, see the following section.

To raise an event, the Script task calls one of the following methods of the IDTSComponentMetaData90 interface exposed by the ComponentMetaData property:

Event Description

FireCustomEvent

Raises a user-defined custom event in the package.

FireError

Informs the package of an error condition.

FireInformation

Provides information to the user.

FireProgress

Informs the package of the progress of the component.

FireWarning

Informs the package that the component is in a state that warrants user notification, but is not an error condition.

Here is a simple example of raising an Error event:

Dim myMetadata as IDTSComponentMetaData90

myMetaData = Me.ComponentMetaData

myMetaData.FireError(...)

참고 항목

관련 자료

Integration Services 이벤트 처리기
패키지 이벤트 처리기 만들기

도움말 및 정보

SQL Server 2005 지원 받기