ComErrorRecord 类

Represents information for an error generated by a replication agent.

继承层次结构

System. . :: . .Object
  Microsoft.SqlServer.Replication..::..ComErrorRecord

命名空间:  Microsoft.SqlServer.Replication
程序集:  Microsoft.SqlServer.Replication(在 Microsoft.SqlServer.Replication.dll 中)

语法

声明
<GuidAttribute("AF9B6ACC-1A5E-4B05-98B5-03936792EE70")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord _
    Implements IComErrorRecord
用法
Dim instance As ComErrorRecord
[GuidAttribute("AF9B6ACC-1A5E-4B05-98B5-03936792EE70")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class ComErrorRecord : IComErrorRecord
[GuidAttribute(L"AF9B6ACC-1A5E-4B05-98B5-03936792EE70")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
public ref class ComErrorRecord : IComErrorRecord
[<GuidAttribute("AF9B6ACC-1A5E-4B05-98B5-03936792EE70")>]
[<ComVisibleAttribute(true)>]
[<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)>]
type ComErrorRecord =  
    class
        interface IComErrorRecord
    end
public class ComErrorRecord implements IComErrorRecord

ComErrorRecord 类型公开以下成员。

构造函数

  名称 说明
公共方法 ComErrorRecord() () () () Creates an instance of the ComErrorRecord class.
公共方法 ComErrorRecord(String, String, Int32) Creates an instance of the ComErrorRecord class and settings properties of the error.

页首

属性

  名称 说明
公共属性 Description A description of the error.
公共属性 ErrorNumber The numeric error code.
公共属性 SourceType A value that identifies the source of the error.

页首

方法

  名称 说明
公共方法 Equals (从 Object 继承。)
受保护方法 Finalize (从 Object 继承。)
公共方法 GetHashCode (从 Object 继承。)
公共方法 GetType (从 Object 继承。)
受保护方法 MemberwiseClone (从 Object 继承。)
公共方法 ToString (从 Object 继承。)

页首

示例

This example (C#) shows how to iterate through the returned error collection after an agent run.

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

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。