Partilhar via


Propriedade do RDL MergeSynchronizationAgent.ComErrorCollection

Gets a collection of errors generated by the replication agent.

Namespace:  Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Replication (em Microsoft.SqlServer.Replication.dll)

Sintaxe

'Declaração
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable 
    Get
'Uso
Dim instance As MergeSynchronizationAgent 
Dim value As IEnumerable 

value = instance.ComErrorCollection
public virtual IEnumerable ComErrorCollection { get; }
public:
virtual property IEnumerable^ ComErrorCollection {
    IEnumerable^ get ();
}
abstract ComErrorCollection : IEnumerable 
override ComErrorCollection : IEnumerable
function get ComErrorCollection () : IEnumerable

Valor da propriedade

Tipo: System.Collections.IEnumerable
A IEnumerable collection of ComErrorRecord objects.

Implementa

IMergeSynchronizationAgent.ComErrorCollection

Comentários

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

Exemplos

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

[C#]

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

Consulte também

Referência

MergeSynchronizationAgent Classe

Namespace Microsoft.SqlServer.Replication