共用方式為


TransSynchronizationAgent.ComErrorCollection Property

Definition

Gets a collection of errors that are generated by the replication agent.

public:
 virtual property System::Collections::IEnumerable ^ ComErrorCollection { System::Collections::IEnumerable ^ get(); };
public virtual System.Collections.IEnumerable ComErrorCollection { get; }
member this.ComErrorCollection : System.Collections.IEnumerable
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable

Property Value

An IEnumerable collection of errors generated by a replication agent.

Implements

Examples

The following example shows how to iterate through the returned error collection after an agent run.

[C#]

foreach (ComErrorRecord errorRecord in agent.ComErrorCollection)  
    {  
      WriteLog("[ERROR: " + errorRecord.ErrorNumber +   
          errorRecord.Description + "]");  
    }  

Remarks

To view all agent errors, you must iterate through the collection of ComErrorRecord objects.

Applies to