共用方式為


DTSForcedExecResult 列舉型別

Specifies the execution result of a container when the container's ForceExecutionValue is set to true.

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

語法

'宣告
Public Enumeration DTSForcedExecResult
'用途
Dim instance As DTSForcedExecResult
public enum DTSForcedExecResult
public enum class DTSForcedExecResult
type DTSForcedExecResult
public enum DTSForcedExecResult

成員

成員名稱 描述
Failure The execution result is set to Failure.
Success The execution result is set to Success.
Completion The execution result is set to Completion.
None The execution result is set to None. The event handler returns the actual execution result; the result is not forced.

備註

This enumeration is available to containers that need to force a specific execution result. You can use the ForceExecutionResult property on a container to test the use of checkpoints in a package. By setting ForceExecutionResult of a task or container to Failure, you can imitate real-time failure. When you rerun the package, failed task and containers will be rerun.

範例

The following code example creates a new package, and explicitly sets the ForceExecutionResult on the Package to Failure.

Package pkg = new Package();
Pkg.ForceExecutionResult = DTSForcedExecResult.Failure;
Dim pkg As Package = New Package() 
Pkg.ForceExecutionResult = DTSForcedExecResult.Failure