Sdílet prostřednictvím


Returning Results from the Script Task

The Script task uses the TaskResult and the optional ExecutionValue properties to return status information to the Integration Services runtime that can be used to determine the path of the workflow after the Script task has finished.

TaskResult

The TaskResult property reports whether the task succeeded or failed. For example:

Dts.TaskResult = ScriptResults.Success

ExecutionValue

The ExecutionValue property optionally returns a user-defined object that quantifies or provides more information about the success or failure of the Script task. For example, the FTP task uses the ExecutionValue property to return the number of files transferred. The Execute SQL task returns the number of rows affected by the task. The ExecutionValue can also be used to determine the path of the workflow. For example:

Dim rowsAffected as Integer

...

rowsAffected = 1000

Dts.ExecutionValue = rowsAffected

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 Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.