Compartir a través de


MergeSynchronizationAgent.ComErrorCollection Property

Gets a collection of errors generated by the replication agent.

Espacio de nombres: Microsoft.SqlServer.Replication
Ensamblado: Microsoft.SqlServer.Replication (in microsoft.sqlserver.replication.dll)

Sintaxis

'Declaración
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable
public virtual IEnumerable ComErrorCollection { get; }
public:
virtual property IEnumerable^ ComErrorCollection {
    IEnumerable^ get ();
}
/** @property */
public IEnumerable get_ComErrorCollection ()
public function get ComErrorCollection () : IEnumerable

Valor de propiedad

A IEnumerable collection of ComErrorRecord objects.

Notas

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

Ejemplo

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

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

MergeSynchronizationAgent Class
MergeSynchronizationAgent Members
Microsoft.SqlServer.Replication Namespace