ComErrorRecord Class
Represents information for an error generated by a replication agent.
Namespace: Microsoft.SqlServer.Replication
Assembly: Microsoft.SqlServer.Replication (in Microsoft.SqlServer.Replication.dll)
Syntax
'Declaration
<GuidAttribute("AF9B6ACC-1A5E-4B05-98B5-03936792EE70")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord _
Implements IComErrorRecord
'Usage
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
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 + "]");
}
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Replication.ComErrorRecord
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.