AddReplError Method

Replication Programming

Replication Programming

AddReplError Method

The AddReplError method adds a new error to a SQLReplErrors collection.

Applies To

SQLReplErrors Collection

Syntax

collection.AddReplError Description, Source, ErrorNumber, _
    ErrorSourceType, ErrorNumberString

Part Description
collection Expression that evaluates to a SQLReplErrors collection.
Description String that describes the error.
Source String that describes the component that generated the error.
ErrorNumber Long integer code for the error.
ErrorSourceType Value from the ERRORSOURCE_TYPE enumerating the type of error source.
ErrorNumberString String representation of the error number.

Remarks

The AddReplError method adds an error to a SQLReplErrors collection without the caller explicitly creating a SQLReplError object. The Add method can be used to add a SQLReplError object to a SQLReplErrors collection.

Prototype (C/C++)

HRESULT AddReplError(
    BSTR bstrDescription,
    BSTR bstrSource,
    long lErrorNumber,
    ERRORSOURCE_TYPE ErrorSourceType,
    BSTR bstrErrorNumberString);

See Also

Add Method

ERRORSOURCE_TYPE

SQLReplError Object