IDTSEvents100.OnQueryCancel 方法

此 API 支持 SQL Server 2012 基础结构,但不能通过代码直接使用。

Indicates a method called at any juncture in task processing where it is feasible to cancel execution. This event is raised by tasks and containers to determine whether they should stop running.

命名空间:  Microsoft.SqlServer.Dts.Runtime.Wrapper
程序集:  Microsoft.SqlServer.DTSRuntimeWrap(在 Microsoft.SqlServer.DTSRuntimeWrap.dll 中)

语法

声明
Sub OnQueryCancel ( _
    <OutAttribute> ByRef pbCancel As Boolean _
)
用法
Dim instance As IDTSEvents100 
Dim pbCancel As Boolean

instance.OnQueryCancel(pbCancel)
void OnQueryCancel(
    out bool pbCancel
)
void OnQueryCancel(
    [OutAttribute] bool% pbCancel
)
abstract OnQueryCancel : 
        pbCancel:bool byref -> unit
function OnQueryCancel(
    pbCancel : boolean
)

参数

  • pbCancel
    类型:System.Boolean%
    true to cancel the query; otherwise, false.

注释

This event is called by the task to determine if the package wishes the task to cease executing. Because the package gives control to the task to execute and does not terminate tasks randomly, there needs to be a juncture at which the package may inform the task that it is attempting to shut down. If the value is true, the task should shut down and a cancelled message is returned from the Execute method of the task. If the value is false, the task continues to run as usual.

For more information, see IDTSEvents.

请参阅

参考

IDTSEvents100 接口

Microsoft.SqlServer.Dts.Runtime.Wrapper 命名空间