MergeSynchronizationAgent.ComErrorCollection Property
Gets a collection of errors generated by the replication agent.
Espace de noms: Microsoft.SqlServer.Replication
Assembly: Microsoft.SqlServer.Replication (in microsoft.sqlserver.replication.dll)
Syntaxe
'Déclaration
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
Valeur de propriété
A IEnumerable collection of ComErrorRecord objects.
Notes
To view all agent errors, you must iterate through the collection of ComErrorRecord objects.
Exemple
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 + "]");
}
Sécurité des threads
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.
Plateformes
Plateformes de développement
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Plateformes cibles
Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.
Voir aussi
Référence
MergeSynchronizationAgent Class
MergeSynchronizationAgent Members
Microsoft.SqlServer.Replication Namespace