共用方式為


ScriptObjectModel.ExecutionValue 屬性

Gets or sets a user-defined object that provides additional information about the results of task execution.

命名空間:  Microsoft.SqlServer.Dts.Tasks.ScriptTask
組件:  Microsoft.SqlServer.ScriptTask (在 Microsoft.SqlServer.ScriptTask.dll 中)

語法

'宣告
Public Property ExecutionValue As Object 
    Get 
    Set
'用途
Dim instance As ScriptObjectModel 
Dim value As Object 

value = instance.ExecutionValue

instance.ExecutionValue = value
public Object ExecutionValue { get; set; }
public:
property Object^ ExecutionValue {
    Object^ get ();
    void set (Object^ value);
}
member ExecutionValue : Object with get, set
function get ExecutionValue () : Object 
function set ExecutionValue (value : Object)

屬性值

型別:System.Object
A user-defined object that provides additional information about the results of task execution.

備註

Use the ExecutionValue property of the Dts object in Script task code to return additional user-defined information about the results of task execution.This property gives the developer a way to exchange data with the package in addition to events and the separate DTSExecResult value. For example, if a Script task deletes rows from a table, it might return the number of rows deleted as the ExecutionValue. Subsequent tasks could then use this value to make decisions for additional processing.

The Script task returns its separate DTSExecResult through the TaskResult property.

範例

The following sample of code for use inside a Script task demonstrates how the ExecutionValue can also be used to determine the path of the workflow.

Dim rowsAffected as Integer
...
rowsAffected = 1000
Dts.ExecutionValue = rowsAffected

請參閱

參考

ScriptObjectModel 類別

Microsoft.SqlServer.Dts.Tasks.ScriptTask 命名空間