IDTSEvents100.OnError(IDTSRuntimeObject100, Int32, String, String, String, Int32, String, Boolean) Method

Definition

出现错误时由任务或容器调用。Called by a task or container when an error occurs.

public:
 void OnError(Microsoft::SqlServer::Dts::Runtime::Wrapper::IDTSRuntimeObject100 ^ pSource, int ErrorCode, System::String ^ SubComponent, System::String ^ Description, System::String ^ HelpFile, int HelpContext, System::String ^ IDOfInterfaceWithError, [Runtime::InteropServices::Out] bool % pbCancel);
[System.Runtime.InteropServices.DispId(6)]
public void OnError (Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSRuntimeObject100 pSource, int ErrorCode, string SubComponent, string Description, string HelpFile, int HelpContext, string IDOfInterfaceWithError, out bool pbCancel);
abstract member OnError : Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSRuntimeObject100 * int * string * string * string * int * string * bool -> unit
Public Sub OnError (pSource As IDTSRuntimeObject100, ErrorCode As Integer, SubComponent As String, Description As String, HelpFile As String, HelpContext As Integer, IDOfInterfaceWithError As String, ByRef pbCancel As Boolean)

Parameters

pSource
IDTSRuntimeObject100

错误的源,导致事件的对象。The source of the error, the object that caused the event.

ErrorCode
Int32

一个用于标识错误消息的整数。An Integer that identifies the error message. 当与 source 参数结合使用时,此标识符应是唯一的,因此,sourceerrorCode 组合应是唯一的。This identifier should be unique when combined with the source parameter, so the source and errorCode combination should be unique. 然而,仅仅是 errorCode 并不一定要求具有唯一性。However, the errorCode alone is not expected to be unique.

SubComponent
String

标识源中子模块的任意字符串。An arbitrary string that identifies the sub-module within a source. 例如,管道任务中的转换。For example, the transform in a Pipeline task.

Description
String

消息的文本。The text of the message.

HelpFile
String

指向包含详细信息的帮助文件的路径。The path to the Help file that contains detailed information.

HelpContext
Int32

帮助文件中该主题的标识符。Identifier of the topic in the Help file.

IDOfInterfaceWithError
String

导致错误的接口的 GUID 的文本表示形式。A textual representation of the GUID of the interface that caused the error.

pbCancel
Boolean

如果要取消错误,则为 true;否则为 false。true to cancel the error; otherwise, false.

Attributes

Remarks

有关详细信息,请参阅 IDTSEventsFor more information, see IDTSEvents.

Applies to