ComErrorRecord Class

Definition

Represents information for an error generated by a replication agent.

public ref class ComErrorRecord : Microsoft::SqlServer::Replication::IComErrorRecord
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("74E3F5F4-FC84-4022-B858-3FA480BE128C")]
public class ComErrorRecord : Microsoft.SqlServer.Replication.IComErrorRecord
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("74E3F5F4-FC84-4022-B858-3FA480BE128C")>]
type ComErrorRecord = class
    interface IComErrorRecord
Public Class ComErrorRecord
Implements IComErrorRecord
Inheritance
ComErrorRecord
Attributes
Implements

Examples

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

Constructors

ComErrorRecord()

Creates an instance of the ComErrorRecord class.

ComErrorRecord(String, String, Int32)

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

Properties

Description

A description of the error.

ErrorNumber

The numeric error code.

SourceType

A value that identifies the source of the error.

Applies to