ComErrorCollection-Eigenschaft
Ruft eine Auflistung von vom Replikations-Agent generierten Fehlern ab.
Namespace: Microsoft.SqlServer.Replication
Assembly: Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)
Syntax
'Declaration
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable
Get
'Usage
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
Eigenschaftswert
Typ: System.Collections. . :: . .IEnumerable
Eine IEnumerable-Auflistung von ComErrorRecord-Objekten.
Implementiert
Hinweise
To view all agent errors, you must iterate through the collection of ComErrorRecord objects.
Beispiele
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 + "]");
}