ComErrorRecord Class
Represents information for an error generated by a replication agent.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Replication.ComErrorRecord
Namespace: Microsoft.SqlServer.Replication
Assembly: Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)
Syntax
'Declaration
<GuidAttribute("B01F32EC-954D-4D89-96F4-E3A583F21131")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord _
Implements IComErrorRecord
'Usage
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
The ComErrorRecord type exposes the following members.
Constructors
Name | Description | |
---|---|---|
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. |
Top
Properties
Name | Description | |
---|---|---|
Description | A description of the error. | |
ErrorNumber | The numeric error code. | |
SourceType | A value that identifies the source of the error. |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
Examples
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 + "]");
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.