TransSynchronizationAgent.ComErrorCollection Property
Gets a collection of errors that are generated by the replication agent.
命名空间: Microsoft.SqlServer.Replication
程序集: Microsoft.SqlServer.Replication (in microsoft.sqlserver.replication.dll)
语法
声明
Public Overridable ReadOnly Property ComErrorCollection As IEnumerable
public virtual IEnumerable ComErrorCollection { get; }
public:
virtual property IEnumerable^ ComErrorCollection {
IEnumerable^ get ();
}
/** @property */
public IEnumerable get_ComErrorCollection ()
public function get ComErrorCollection () : IEnumerable
属性值
A IEnumerable collection of ComErrorRecord objects.
备注
To view all agent errors, you must iterate through the collection of ComErrorRecord objects.
示例
The following example shows how to iterate through the returned error collection after an agent run.
[C#]
foreach (ComErrorRecord errorRecord in agent.ComErrorCollection)
{
WriteLog("[ERROR: " + errorRecord.ErrorNumber +
errorRecord.Description + "]");
}
线程安全
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.
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
TransSynchronizationAgent Class
TransSynchronizationAgent Members
Microsoft.SqlServer.Replication Namespace