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("B01F32EC-954D-4D89-96F4-E3A583F21131")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord _
Implements IComErrorRecord
用法
Dim instance As ComErrorRecord
[GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class ComErrorRecord : IComErrorRecord
[GuidAttribute(L"B01F32EC-954D-4D89-96F4-E3A583F21131")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
public ref class ComErrorRecord : IComErrorRecord
[<GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")>]
[<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) 成员都是线程安全的。不保证所有实例成员都是线程安全的。