Partilhar via


Classe ComErrorRecord

Represents information for an error generated by a replication agent.

Namespace:  Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Replication (em Microsoft.SqlServer.Replication.dll)

Sintaxe

'Declaração
<GuidAttribute("AF9B6ACC-1A5E-4B05-98B5-03936792EE70")> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ComErrorRecord _
    Implements IComErrorRecord
'Uso
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

Exemplos

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 + "]");
    }

Hierarquia de herança

System. . :: . .Object
  Microsoft.SqlServer.Replication..::..ComErrorRecord

Segurança de thread

Quaisquer membros static (Shared no Visual Basic) públicos deste tipo são thread-safe. Não há garantia de que qualquer membro de instância seja thread-safe.