Aracılığıyla paylaş


DefaultEvents.OnError Yöntemi

Bir hata oluştuğunda, bu olay bir görev veya kapsayıcı tarafından oluşturulur.

Ad Alanı:  Microsoft.SqlServer.Dts.Runtime
Derleme:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS içinde.dll)

Sözdizimi

'Bildirim
Public Overridable Function OnError ( _
    source As DtsObject, _
    errorCode As Integer, _
    subComponent As String, _
    description As String, _
    helpFile As String, _
    helpContext As Integer, _
    idofInterfaceWithError As String _
) As Boolean
'Kullanım
Dim instance As DefaultEvents
Dim source As DtsObject
Dim errorCode As Integer
Dim subComponent As String
Dim description As String
Dim helpFile As String
Dim helpContext As Integer
Dim idofInterfaceWithError As String
Dim returnValue As Boolean

returnValue = instance.OnError(source, _
    errorCode, subComponent, description, _
    helpFile, helpContext, idofInterfaceWithError)
public virtual bool OnError(
    DtsObject source,
    int errorCode,
    string subComponent,
    string description,
    string helpFile,
    int helpContext,
    string idofInterfaceWithError
)
public:
virtual bool OnError(
    DtsObject^ source, 
    int errorCode, 
    String^ subComponent, 
    String^ description, 
    String^ helpFile, 
    int helpContext, 
    String^ idofInterfaceWithError
)
abstract OnError : 
        source:DtsObject * 
        errorCode:int * 
        subComponent:string * 
        description:string * 
        helpFile:string * 
        helpContext:int * 
        idofInterfaceWithError:string -> bool 
override OnError : 
        source:DtsObject * 
        errorCode:int * 
        subComponent:string * 
        description:string * 
        helpFile:string * 
        helpContext:int * 
        idofInterfaceWithError:string -> bool 
public function OnError(
    source : DtsObject, 
    errorCode : int, 
    subComponent : String, 
    description : String, 
    helpFile : String, 
    helpContext : int, 
    idofInterfaceWithError : String
) : boolean

Parametreler

  • errorCode
    Tür: System.Int32
    Hata iletisi tanımlayan bir tamsayı.Bu tanımlayıcı ile birleştirildiğinde benzersiz source parametresi, bu nedenle source ve errorCode birlikte benzersiz olması gerekir.Ancak, errorCode tek başına benzersiz olması beklenmiyor.
  • subComponent
    Tür: System.String
    Sub-module içinde kaynak tanımlayan isteğe bağlı bir dize.Örneğin, bir kanal görevi dönüştürme.
  • helpFile
    Tür: System.String
    Ayrıntılı bilgi içeren Yardım dosyası yol.
  • helpContext
    Tür: System.Int32
    Yardım dosyasındaki bir konu tanımlayıcısı.
  • idofInterfaceWithError
    Tür: System.String
    Hataya neden arabirim GUID metinsel gösterimini.

Dönüş Değeri

Tür: System.Boolean
A Boole görev yürütme devam olup olmadığını gösterir.Değeri, doğru iptal etmek görev hata neden gösterir.Değeri, yanlış hata görevin yürütülmesini durdurmak, ancak görev devam etmesi gerektiğini gösterir.

Uygulamalar

IDTSEvents.OnError(DtsObject, Int32, String, String, String, Int32, String)