Export (0) Print
Expand All

ScriptObjectModel.TaskResult Property

Returns the DTSExecResult of the Script task, mapped to the corresponding member of the ScriptObjectModel.Results enumeration.

Namespace: Microsoft.SqlServer.Dts.Tasks.ScriptTask
Assembly: Microsoft.SqlServer.ScriptTask (in microsoft.sqlserver.scripttask.dll)

public int TaskResult { get; set; }
/** @property */
public int get_TaskResult ()

/** @property */
public void set_TaskResult (int value)

public function get TaskResult () : int

public function set TaskResult (value : int)

Property Value

The DTSExecResult of the Script task, mapped to the corresponding member of the ScriptObjectModel.Results enumeration.

Use the TaskResult property of the Dts object in Script task code to notify the package of the success or failure of the Script task.

The Script task can also return additional user-defined information about the results of its execution through the ExecutionValue property.


The following sample of code for use inside a Script task demonstrates the use of the TaskResult property.

Dts.TaskResult = Dts.Results.Success

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft