TransSynchronizationAgent.ComErrorCollection Property
Gets a collection of errors that are generated by the replication agent.
Spazio dei nomi: Microsoft.SqlServer.Replication
Assembly : Microsoft.SqlServer.Replication (in microsoft.sqlserver.replication.dll)
Sintassi
'Dichiarazione
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
Valore proprietà
A IEnumerable collection of ComErrorRecord objects.
Osservazioni
To view all agent errors, you must iterate through the collection of ComErrorRecord objects.
Esempio
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 + "]");
}
Thread Safety
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.
Piattaforme
Piattaforme di sviluppo
Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.
Piattaforme di destinazione
Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.
Vedere anche
Riferimento
TransSynchronizationAgent Class
TransSynchronizationAgent Members
Microsoft.SqlServer.Replication Namespace