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("0029598f-26fa-46f7-953b-86e2947ab19f")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord
Implements IComErrorRecord
[GuidAttribute("0029598f-26fa-46f7-953b-86e2947ab19f")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class ComErrorRecord : IComErrorRecord
[GuidAttribute(L"0029598f-26fa-46f7-953b-86e2947ab19f")]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
public ref class ComErrorRecord : IComErrorRecord
/** @attribute GuidAttribute("0029598f-26fa-46f7-953b-86e2947ab19f") */
/** @attribute ComVisibleAttribute(true) */
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */
public class ComErrorRecord implements IComErrorRecord
GuidAttribute("0029598f-26fa-46f7-953b-86e2947ab19f")
ComVisibleAttribute(true)
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)
public class ComErrorRecord implements IComErrorRecord
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Replication.ComErrorRecord
Example
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 Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
ComErrorRecord Members
Microsoft.SqlServer.Replication Namespace