Building Custom Tasks for SQL Server Integration Services by Andy Leonard

Building Custom Tasks for SQL Server Integration Services by Andy Leonard

Author:Andy Leonard
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


After adding this code, your class should appear similar to that shown in Figure 5-12.

Figure 5-12.Overriding the Validate function

The Validate method is called when the task is added to the SSIS Control Flow, when a property changes, and when a task is executed. The line Return DTSExecResult.Success tells the method to return Success—which translates to “I think I am ready to run” in Task-Speak—to the Control Flow when the method is invoked.

Overriding the Execute Method

As with the Validate method, we override the inherited Execute method with a bare minimum of functionality. Again, this is not production-ready code.

Add the Execute method override by adding the following code to the ExecuteCatalogPackageTask class:

Public Overrides Function Execute(ByVal connections As Connections, _

ByVal variableDispenser As VariableDispenser, _

ByVal componentEvents As IDTSComponentEvents, _

ByVal log As IDTSLogging, _

ByVal transaction As Object) As DTSExecResult

Return DTSExecResult.Success

End Function



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.