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) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。