ComErrorRecord ComErrorRecord ComErrorRecord 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
type ComErrorRecord = class
    interface IComErrorRecord
Public Class ComErrorRecord
Implements IComErrorRecord
Inheritance
ComErrorRecordComErrorRecordComErrorRecordComErrorRecord
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() ComErrorRecord() ComErrorRecord() ComErrorRecord()

Creates an instance of the ComErrorRecord class.

ComErrorRecord(String, String, Int32) ComErrorRecord(String, String, Int32) ComErrorRecord(String, String, Int32) ComErrorRecord(String, String, Int32)

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

Properties

Description Description Description Description

A description of the error.

ErrorNumber ErrorNumber ErrorNumber ErrorNumber

The numeric error code.

SourceType SourceType SourceType SourceType

A value that identifies the source of the error.

Applies to