다음을 통해 공유


ComErrorCollection 속성

Gets a collection of errors generated by the replication agent.

네임스페이스:  Microsoft.SqlServer.Replication
어셈블리:  Microsoft.SqlServer.Replication.dll의 Microsoft.SqlServer.Replication

구문

‘선언
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable
    Get
‘사용 방법
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

속성 값

형식: System.Collections. . :: . .IEnumerable
A IEnumerable collection of ComErrorRecord objects.

구현

IMergeSynchronizationAgent. . :: . .ComErrorCollection

주의

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

예제

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