Udostępnij przez


Metoda DefaultEvents.OnError

To zdarzenie jest wywoływane przez zadania lub kontener, gdy wystąpi błąd.

Przestrzeń nazw:  Microsoft.SqlServer.Dts.Runtime
Zestaw:  Microsoft.SqlServer.ManagedDTS (w Microsoft.SqlServer.ManagedDTS.dll)

Składnia

'Deklaracja
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
'Użycie
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

Parametry

  • errorCode
    Typ: System.Int32
    Liczba całkowita, która identyfikuje komunikat o błędzie.Identyfikator ten powinien być unikatowy w połączeniu z source parametru, tak source i errorCode kombinacji powinien być unikatowy.Jednakże errorCode samodzielnie nie powinien być unikatowy.
  • subComponent
    Typ: System.String
    Dowolny ciąg identyfikujący podmodułów wewnątrz źródło.Na przykład przekształcanie w zadaniu rurociągu.
  • helpFile
    Typ: System.String
    Ścieżka do pliku pomocy, który zawiera szczegółowe informacje.
  • helpContext
    Typ: System.Int32
    Identyfikator tematu w pliku pomocy.
  • idofInterfaceWithError
    Typ: System.String
    Tekstowa reprezentacja identyfikatora GUID interfejs, który spowodował błąd.

Wartość zwracana

Typ: System.Boolean
A wartość logiczna , wskazuje, czy zadanie należy kontynuować wykonywanie.Wartość true wskazuje, że błąd powinno powodować anulowanie zadania.Wartość false wskazuje, że błąd nie należy zatrzymywać wykonywanie zadania, ale zadanie powinno powtarzać.

Implementacje

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