Export (0) Print
Expand All

ComErrorRecord Class

Topic Status: Some information in this topic is pre-release and subject to change in future releases. Pre-release information describes new features or changes to existing features in Microsoft SQL Server 2014.

Represents information for an error generated by a replication agent.

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.

Community Additions

Show:
© 2014 Microsoft