Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ComErrorRecord Class

Represents information for an error generated by a replication agent.

System.Object
  Microsoft.SqlServer.Replication.ComErrorRecord

Namespace:  Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)
[GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class ComErrorRecord : IComErrorRecord

The ComErrorRecord type exposes the following members.

  NameDescription
Public methodComErrorRecord()Creates an instance of the ComErrorRecord class.
Public methodComErrorRecord(String, String, Int32)Creates an instance of the ComErrorRecord class and settings properties of the error.
Top
  NameDescription
Public propertyDescriptionA description of the error.
Public propertyErrorNumberThe numeric error code.
Public propertySourceTypeA value that identifies the source of the error.
Top
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.