ComErrorCollection Propiedad
Gets a collection of errors that are generated by the replication agent.
Espacio de nombres: Microsoft.SqlServer.Replication
Ensamblado: Microsoft.SqlServer.Replication (en Microsoft.SqlServer.Replication.dll)
Sintaxis
'Declaración
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable
Get
'Uso
Dim instance As TransSynchronizationAgent
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 de la propiedad
Tipo: System.Collections. . :: . .IEnumerable
A IEnumerable collection of ComErrorRecord objects.
Implementa
Ejemplos
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 + "]");
}