ComErrorRecord Class

ComErrorRecord Class

 

Represents information for an error generated by a replication agent.

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

System.Object
  Microsoft.SqlServer.Replication.ComErrorRecord

[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
[GuidAttribute("74E3F5F4-FC84-4022-B858-3FA480BE128C")]
[ComVisibleAttribute(true)]
public class ComErrorRecord

NameDescription
System_CAPS_pubmethodComErrorRecord()

Creates an instance of the ComErrorRecord class.

System_CAPS_pubmethodComErrorRecord(String, String, Int32)

Creates an instance of the ComErrorRecord class and settings properties of the error.

NameDescription
System_CAPS_pubpropertyDescription

A description of the error.

System_CAPS_pubpropertyErrorNumber

The numeric error code.

System_CAPS_pubpropertySourceType

A value that identifies the source of the error.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

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 + "]");
    }

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft