ComErrorRecord クラス

定義

複製エージェントによって生成されたエラーの情報を表します。

public ref class ComErrorRecord : Microsoft::SqlServer::Replication::IComErrorRecord
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("74E3F5F4-FC84-4022-B858-3FA480BE128C")]
public class ComErrorRecord : Microsoft.SqlServer.Replication.IComErrorRecord
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Runtime.InteropServices.Guid("74E3F5F4-FC84-4022-B858-3FA480BE128C")>]
type ComErrorRecord = class
    interface IComErrorRecord
Public Class ComErrorRecord
Implements IComErrorRecord
継承
ComErrorRecord
属性
実装

この例(C#)は、エージェント実行後に返されたエラーコレクションを繰り返し処理する方法を示しています。

foreach (ComErrorRecord errorRecord in agent.ComErrorCollection)  
    {  
      WriteLog("[ERROR: " + errorRecord.ErrorNumber +   
          errorRecord.Description + "]");  
    }  

コンストラクター

名前 説明
ComErrorRecord()

ComErrorRecord クラスのインスタンスを作成します。

ComErrorRecord(String, String, Int32)

エラーの ComErrorRecord クラスとsettingsプロパティのインスタンスを作成します。

プロパティ

名前 説明
Description

エラーの説明。

ErrorNumber

数値エラー コード。

SourceType

誤りの発生源を特定する値を。

適用対象