共用方式為


ScriptObjectModel.TaskResult Property

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

命名空間: Microsoft.SqlServer.Dts.Tasks.ScriptTask
組件: Microsoft.SqlServer.ScriptTask (in microsoft.sqlserver.scripttask.dll)

語法

'宣告
Public Property TaskResult As Integer
public int TaskResult { get; set; }
public:
property int TaskResult {
    int get ();
    void set (int value);
}
/** @property */
public int get_TaskResult ()

/** @property */
public void set_TaskResult (int value)
public function get TaskResult () : int

public function set TaskResult (value : int)

屬性值

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.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

ScriptObjectModel Class
ScriptObjectModel Members
Microsoft.SqlServer.Dts.Tasks.ScriptTask Namespace