EnumAgentErrorRecords Method (SQL-DMO)

The EnumAgentErrorRecords method returns a QueryResults object enumerating a specified replication agent error.

Applies To

DistributionPublisher Object

Syntax

object.EnumAgentErrorRecords( ErrorID ) as QueryResults

Part Description
object Expression that evaluates to an object in the Applies To list
ErrorID Long integer identifying an error

Returns

A QueryResults object containing one result set defined by these columns.

Column Data type Description
source_type_id integer Identifier of type of error source
source_name nvarchar(101) Name of error source
error_code nvarchar(129) Error code
error_text ntext Error message
  nvarchar(26) Date and time at which error occurred
error_type_id integer Reserved

Remarks

Interpret the value of the source_type_id column by using these values.

source_type_id value Error source
0 Undefined or unable to determine.
1 Replication command. error_text column contains command.
2 Replication agent.
3 Operating system error.
4 ODBC.
5 Data source, such as Microsoft® SQL Server™.
6 SQL Server Net-Library.
7 SQL-DMO.

Prototype (C/C++)

HRESULT EnumAgentErrorRecords(LONG ErrorID
LPSQLDMOQUERYRESULTS* ppResults);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.