Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

ComErrorRecord Class

 

Applies To: SQL Server 2016 Preview

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

[GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
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.)

Legacy Code Example

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

Community Additions

Show:
© 2015 Microsoft