共用方式為


IDTSComponentMetaData100.FireError 方法

Raises an OnError event.

命名空間:  Microsoft.SqlServer.Dts.Pipeline.Wrapper
組件:  Microsoft.SqlServer.DTSPipelineWrap (在 Microsoft.SqlServer.DTSPipelineWrap.dll 中)

語法

'宣告
Sub FireError ( _
    ErrorCode As Integer, _
    SubComponent As String, _
    Description As String, _
    HelpFile As String, _
    HelpContext As Integer, _
    <OutAttribute> ByRef pbCancel As Boolean _
)
'用途
Dim instance As IDTSComponentMetaData100 
Dim ErrorCode As Integer 
Dim SubComponent As String 
Dim Description As String 
Dim HelpFile As String 
Dim HelpContext As Integer 
Dim pbCancel As Boolean

instance.FireError(ErrorCode, SubComponent, _
    Description, HelpFile, HelpContext, _
    pbCancel)
void FireError(
    int ErrorCode,
    string SubComponent,
    string Description,
    string HelpFile,
    int HelpContext,
    out bool pbCancel
)
void FireError(
    [InAttribute] int ErrorCode, 
    [InAttribute] String^ SubComponent, 
    [InAttribute] String^ Description, 
    [InAttribute] String^ HelpFile, 
    [InAttribute] int HelpContext, 
    [OutAttribute] bool% pbCancel
)
abstract FireError : 
        ErrorCode:int * 
        SubComponent:string * 
        Description:string * 
        HelpFile:string * 
        HelpContext:int * 
        pbCancel:bool byref -> unit
function FireError(
    ErrorCode : int, 
    SubComponent : String, 
    Description : String, 
    HelpFile : String, 
    HelpContext : int, 
    pbCancel : boolean
)

參數

  • ErrorCode
    型別:System.Int32
    The component-defined error code.
  • SubComponent
    型別:System.String
    The name of the component that raises the event.
  • Description
    型別:System.String
    The description of the error.
  • HelpFile
    型別:System.String
    The help file that provides more information about the error event.
  • HelpContext
    型別:System.Int32
    The context ID for the error.
  • pbCancel
    型別:System.Boolean%
    Specifies whether execution of the component is cancelled.

備註

An OnError event can be raised during package design or execution. During design time, errors are displayed in the Task List window and also cause a red X icon to be displayed next to the component shape on the designer surface. During execution, the error event may cause package execution to terminate.

請參閱

參考

IDTSComponentMetaData100 介面

Microsoft.SqlServer.Dts.Pipeline.Wrapper 命名空間