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.


Namespace:  Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)
public class ComErrorRecord : IComErrorRecord

The ComErrorRecord type exposes the following members.

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.
Public propertyDescriptionA description of the error.
Public propertyErrorNumberThe numeric error code.
Public propertySourceTypeA value that identifies the source of the error.
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.)

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

© 2014 Microsoft. All rights reserved.