次の方法で共有


MergeSynchronizationAgent.ComErrorCollection プロパティ

Gets a collection of errors generated by the replication agent.

名前空間:  Microsoft.SqlServer.Replication
アセンブリ:  Microsoft.SqlServer.Replication (Microsoft.SqlServer.Replication.dll)

構文

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

関連項目

参照

MergeSynchronizationAgent クラス

Microsoft.SqlServer.Replication 名前空間