--- title: "Raising Events in the Script Component | Microsoft Docs" ms.custom: "" ms.date: "03/06/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: integration-services ms.topic: "reference" helpviewer_keywords: - "Script component [Integration Services], raising events" ms.assetid: bb389073-e1d0-4794-8d29-c8b293b6a5e3 author: janinezhang ms.author: janinez manager: craigg --- # 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 property of the `ScriptMain` class. For more information about how [!INCLUDE[ssISnoversion](../../../includes/ssisnoversion-md.md)] packages handle events, see [Integration Services (SSIS) Event Handlers](../../integration-services-ssis-event-handlers.md). 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 method to log information to a log provider without raising an event. For more information about how to use the method, see the following section. To raise an event, the Script task calls one of the following methods of the interface exposed by the property: |Event|Description| |-----------|-----------------| ||Raises a user-defined custom event in the package.| ||Informs the package of an error condition.| ||Provides information to the user.| ||Informs the package of the progress of the component.| ||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 IDTSComponentMetaData100` `myMetaData = Me.ComponentMetaData` `myMetaData.FireError(...)` ![Integration Services icon (small)](../../media/dts-16.gif "Integration Services icon (small)") **Stay Up to Date with Integration Services**
For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the [!INCLUDE[ssISnoversion](../../../includes/ssisnoversion-md.md)] page on MSDN:

[Visit the Integration Services page on MSDN](https://go.microsoft.com/fwlink/?LinkId=136655)

For automatic notification of these updates, subscribe to the RSS feeds available on the page. ## See Also [Integration Services (SSIS) Event Handlers](../../integration-services-ssis-event-handlers.md) [Add an Event Handler to a Package](../../add-an-event-handler-to-a-package.md)