Freigeben über


ComErrorRecord-Klasse

Represents information for an error generated by a replication agent.

Vererbungshierarchie

System.Object
  Microsoft.SqlServer.Replication.ComErrorRecord

Namespace:  Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)

Syntax

'Declaration
<GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord _
    Implements IComErrorRecord
'Usage
Dim instance As ComErrorRecord
[GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class ComErrorRecord : IComErrorRecord
[GuidAttribute(L"B01F32EC-954D-4D89-96F4-E3A583F21131")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
public ref class ComErrorRecord : IComErrorRecord
[<GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")>]
[<ComVisibleAttribute(true)>]
[<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)>]
type ComErrorRecord =  
    class 
        interface IComErrorRecord 
    end
public class ComErrorRecord implements IComErrorRecord

Der ComErrorRecord-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode ComErrorRecord() Creates an instance of the ComErrorRecord class.
Öffentliche Methode ComErrorRecord(String, String, Int32) Creates an instance of the ComErrorRecord class and settings properties of the error.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche Eigenschaft Description A description of the error.
Öffentliche Eigenschaft ErrorNumber The numeric error code.
Öffentliche Eigenschaft SourceType A value that identifies the source of the error.

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode Equals (Geerbt von Object.)
Geschützte Methode Finalize (Geerbt von Object.)
Öffentliche Methode GetHashCode (Geerbt von Object.)
Öffentliche Methode GetType (Geerbt von Object.)
Geschützte Methode MemberwiseClone (Geerbt von Object.)
Öffentliche Methode ToString (Geerbt von Object.)

Zum Anfang

Beispiele

This example (C#) shows how to iterate through the returned error collection after an agent run.

foreach (ComErrorRecord errorRecord in agent.ComErrorCollection)
    {
      WriteLog("[ERROR: " + errorRecord.ErrorNumber + 
          errorRecord.Description + "]");
    }

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Replication-Namespace