Share via


BusinessLogicModule.InsertErrorHandler Method

Definition

Optional method implements the custom business logic invoked when an error occurs at the time an INSERT statement is being uploaded or downloaded.

public:
 virtual Microsoft::SqlServer::Replication::BusinessLogicSupport::ActionOnDataError InsertErrorHandler(Microsoft::SqlServer::Replication::BusinessLogicSupport::SourceIdentifier insertSource, System::Data::DataSet ^ insertedDataSet, Microsoft::SqlServer::Replication::BusinessLogicSupport::ErrorLogType % errorLogType, System::String ^ % customErrorMessage, int errorCode, System::String ^ errorMessage, int % historyLogLevel, System::String ^ % historyLogMessage);
public virtual Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError InsertErrorHandler (Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier insertSource, System.Data.DataSet insertedDataSet, ref Microsoft.SqlServer.Replication.BusinessLogicSupport.ErrorLogType errorLogType, ref string customErrorMessage, int errorCode, string errorMessage, ref int historyLogLevel, ref string historyLogMessage);
abstract member InsertErrorHandler : Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier * System.Data.DataSet * ErrorLogType * string * int * string * int * string -> Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError
override this.InsertErrorHandler : Microsoft.SqlServer.Replication.BusinessLogicSupport.SourceIdentifier * System.Data.DataSet * ErrorLogType * string * int * string * int * string -> Microsoft.SqlServer.Replication.BusinessLogicSupport.ActionOnDataError
Public Overridable Function InsertErrorHandler (insertSource As SourceIdentifier, insertedDataSet As DataSet, ByRef errorLogType As ErrorLogType, ByRef customErrorMessage As String, errorCode As Integer, errorMessage As String, ByRef historyLogLevel As Integer, ByRef historyLogMessage As String) As ActionOnDataError

Parameters

insertSource
SourceIdentifier

SourceIdentifier that indicates whether the source of the insert that generated the error is the Publisher or the Subscriber.

insertedDataSet
DataSet

Dataset that contains the GUID of the row that was inserted.

errorLogType
ErrorLogType

ErrorLogType output parameter that controls how replication logs the error. This parameter is used only if the return value is AcceptCustomErrorBehavior.

customErrorMessage
String

Output parameter used to return a custom error message. This parameter is only used if the return value is AcceptCustomErrorBehavior.

errorCode
Int32

Error code that corresponds to the underlying replication error that occurred.

errorMessage
String

Error message text that corresponds to the underlying replication error that occurred.

historyLogLevel
Int32

Log level of the custom message returned by the custom business logic handler.

historyLogMessage
String

Log message provided by the custom business logic handler. The log message gets written to the distribution database.

Returns

The ActionOnDataError action that will be taken by the process after the custom business logic handler has executed.

Applies to